/* Detail page shared styles (free + discount) */

:root {
  --detail-border: #e5e7eb;
  --detail-muted: #6b7280;
  --detail-blue: #1677ea;
  --detail-star: #f59e0b;
  --detail-bg: #f5f7fb;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--detail-bg);
  color: #111827;
  margin: 0;
}

.muted { color: var(--detail-muted); }
.mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Discount layout */
header {
  border-bottom: 1px solid var(--detail-border);
  background: #fff;
}
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
main.container {
  padding-top: 32px;
  padding-bottom: 56px;
}
.nav-content {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
header .nav-content {
  width: min(100%, 1440px);
  max-width: 1440px;
  padding: 0 20px;
  box-sizing: border-box;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #111827;
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
}
.logo-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.logo-title {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}
.logo-title-accent {
  color: #2f7df6;
}
.logo-tagline {
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: clamp(0.08em, 0.55vw, 0.16em);
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2vw, 32px);
  flex: 1 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
  height: 100%;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.75vw, 14px);
  flex-wrap: nowrap;
  min-width: 0;
}

.main-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 clamp(8px, 0.75vw, 12px);
  border-radius: 8px;
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border: 0;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.main-nav-link:hover,
.main-nav-link:focus-visible,
.main-nav-link.is-active {
  color: var(--detail-blue);
  background: #eef6ff;
  outline: none;
}

.main-nav-menu {
  position: relative;
}

.main-nav-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  display: none;
  padding: 8px;
  border: 1px solid var(--detail-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  z-index: 250;
}

.main-nav-menu:hover .main-nav-menu-list,
.main-nav-menu:focus-within .main-nav-menu-list {
  display: grid;
  gap: 2px;
}

.main-nav-menu-list a {
  display: block;
  padding: 9px 10px;
  border-radius: 7px;
  color: #475569;
  text-decoration: none;
  font-weight: 700;
}

.main-nav-menu-list a:hover,
.main-nav-menu-list a:focus-visible {
  color: var(--detail-blue);
  background: #f1f7ff;
  outline: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.mobile-nav-toggle {
  display: none;
}

@media (min-width: 901px) {
  .nav-content {
    flex-wrap: nowrap;
  }

  .logo {
    flex: 0 0 auto;
  }

  .nav-actions {
    flex-wrap: nowrap;
  }

  .main-nav {
    flex: 0 1 auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .nav-right {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--detail-border);
  background: #fff;
  color: #475569;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr)) minmax(280px, 1.5fr);
  gap: 28px;
  padding-top: 34px;
  padding-bottom: 34px;
}

.footer-column h2 {
  margin: 0 0 12px;
  font-size: 14px;
  color: #111827;
}

.footer-column a {
  display: block;
  width: fit-content;
  margin: 7px 0;
  color: #475569;
  text-decoration: none;
  font-weight: 650;
}

.footer-column a:hover {
  color: var(--detail-blue);
}

.footer-email {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
  word-break: break-word;
}

.footer-email:hover {
  text-decoration: underline;
}

.footer-legal {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.7;
}

.footer-legal p {
  margin: 0;
}

.footer-legal p + p {
  margin-top: 8px;
}

@media (min-width: 901px) and (max-width: 1280px) {
  header .nav-content {
    gap: clamp(12px, 1.4vw, 24px);
  }

  .logo {
    gap: 10px;
  }

  .logo-tagline {
    letter-spacing: 0.18em;
  }

  .main-nav {
    gap: clamp(4px, 0.5vw, 8px);
  }

  .main-nav-link {
    padding: 0 8px;
    font-size: 13px;
  }
}
.region-select,
.lang-select {
  border: 1px solid var(--detail-border);
  background: #fff;
  color: #111827;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  min-height: 44px;
  line-height: 1.2;
  min-width: 120px;
  max-width: 100%;
}
.logo-icon {
  width: 54px;
  height: 54px;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: none;
}
.logo-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.logo-icon svg {
  width: 34px;
  height: 34px;
}
.card {
  background: #fff;
  border: 1px solid var(--detail-border);
  border-radius: 18px;
  padding: 34px;
  margin: 28px 0;
}
.hero {
  display: flex;
  align-items: center;
  gap: 32px;
}
.icon {
  width: 170px;
  height: 170px;
  border-radius: 28px;
  object-fit: cover;
  border: 1px solid var(--detail-border);
}
.h1 { font-size: 56px; line-height: 1.1; margin: 0 0 18px 0; }
.meta {
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 20px;
}
.deal-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.badge {
  background: #ef4444;
  color: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 800;
}
.btn {
  display: inline-block;
  background: var(--detail-blue);
  color: #fff;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  margin-top: 22px;
  margin-right: 14px;
}

/* Screenshots strip (both free + discount can use this) */
.shots-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  padding-bottom: 6px; /* keep scrollbar visible */
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.shots-strip::-webkit-scrollbar { height: 10px; }
.shots-strip::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.shots-strip::-webkit-scrollbar-track { background: transparent; }
.shot { flex: 0 0 auto; margin: 0; }
.shot img {
  display: block;
  height: min(62vh, 560px);
  width: auto;
  max-width: none;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--detail-border);
  background: #f8fafc;
}
.discount-screenshot-gallery {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  padding: 2px 0 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.discount-screenshot-gallery::-webkit-scrollbar { height: 10px; }
.discount-screenshot-gallery::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.discount-screenshot-gallery::-webkit-scrollbar-track { background: transparent; }
.discount-screenshot-gallery .screenshot-item {
  flex: 0 0 auto;
  width: auto;
  max-width: min(72vw, 760px);
  margin: 0;
  scroll-snap-align: start;
}
.discount-screenshot-gallery .screenshot-item a {
  display: inline-block;
  background: #f8fafc;
  border: 1px solid var(--detail-border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
}
.discount-screenshot-gallery .screenshot-item img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(72vw, 760px);
  max-height: min(68vh, 720px);
  object-fit: contain;
  background: #f8fafc;
}

/* Free layout sections (kept, used by free detail) */
main.free-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}
.detail-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 26px;
  color: #475569;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
}
.detail-breadcrumbs .crumb-home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.detail-breadcrumbs .crumb-home-icon {
  width: 16px;
  height: 16px;
  color: #475569;
  display: inline-flex;
}
.detail-breadcrumbs .crumb-home-icon svg {
  width: 16px;
  height: 16px;
}
.detail-breadcrumbs a {
  color: #334155;
  text-decoration: none;
  font-weight: 400;
}
.detail-breadcrumbs a:hover {
  text-decoration: underline;
}
.detail-breadcrumbs .crumb-sep {
  color: #64748b;
  font-weight: 400;
}
.detail-breadcrumbs .crumb-current {
  color: #475569;
  font-weight: 400;
}
.crumb-platforms {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.crumb-platform-divider {
  color: var(--detail-muted);
  margin: 0 1px;
}
.free-back-link {
  margin: 0 0 18px;
}
.free-back-link a {
  color: var(--detail-muted);
  text-decoration: none;
}
.free-back-link a:hover {
  text-decoration: underline;
}
section.free-section, header.free-header {
  background: #fff;
  border: 1px solid var(--detail-border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}
.hero-top { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.detail-banner,
.free-header.detail-banner,
.card.detail-banner {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 36px 40px 30px;
  background:
    radial-gradient(circle at right top, rgba(59, 130, 246, 0.10), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 55%, #f3f8ff 100%);
}
.detail-banner::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.09), transparent 64%);
  pointer-events: none;
}
.banner-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  column-gap: 32px;
  row-gap: 18px;
  align-items: start;
}
.banner-prices,
.banner-actions {
  grid-column: 1 / -1;
}
.banner-copy {
  min-width: 0;
}
.hero-icon {
  width: 152px;
  height: 152px;
  border-radius: 32px;
  object-fit: cover;
  border: 1px solid var(--detail-border);
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.10);
}
.banner-copy h1,
.detail-banner .h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.banner-meta {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 18px;
}
.banner-badge-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
}
.banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 16px;
}
.banner-badge svg {
  width: 18px;
  height: 18px;
  display: block;
}
.banner-badge.discount {
  background: #f97316;
}
.banner-badge.new-arrival {
  background: #1677ea;
}
.banner-prices {
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: 2px;
}
.banner-price-label {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
}
.banner-prices > div:has(.banner-price-value.current) .banner-price-label {
  color: #10b981;
}
.banner-price-value {
  font-size: 44px;
  font-weight: 700;
  color: #0f172a;
  margin-left: 8px;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}
.banner-price-value.current {
  color: #10b981;
}
.banner-price-value.current.discount {
  color: #10b981;
}
.banner-prices.single-price {
  gap: 0;
}
.banner-prices.single-price > div {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.banner-prices.single-price .banner-price-value {
  margin-left: 0;
}
.banner-price-value.current.new-free {
  color: #10b981;
}
.banner-price-value.current.new-paid {
  color: var(--detail-blue);
}
.ended-price-note {
  color: #64748b;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 0;
}
.banner-actions .cta-button {
  margin-top: 0;
}
.banner-highlights {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
  padding-top: 8px;
  border-top: 0;
}
.banner-highlight {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.banner-highlight + .banner-highlight {
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  padding-left: 26px;
}
.banner-highlight-icon {
  width: 34px;
  height: 34px;
  border-radius: 0;
  background: transparent;
  color: #2563eb;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.banner-highlight-icon svg {
  width: 28px;
  height: 28px;
  display: block;
  flex: 0 0 auto;
  stroke-width: 1.75;
}
.banner-highlight.safe .banner-highlight-icon svg {
  transform: scaleX(1.12);
  transform-origin: center;
}
.banner-highlight.safe .banner-highlight-title,
.banner-highlight.safe .banner-highlight-icon,
.banner-highlight.verified .banner-highlight-title,
.banner-highlight.verified .banner-highlight-icon {
  color: #2563eb;
}
.banner-highlight.promo .banner-highlight-title,
.banner-highlight.promo .banner-highlight-icon {
  color: #10b981;
}
.banner-highlight-title {
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}
.banner-highlight-text {
  color: #64748b;
  line-height: 1.6;
}
.banner-watermark {
  position: absolute;
  right: 24px;
  top: 24px;
  width: 240px;
  opacity: 0.16;
  pointer-events: none;
  text-align: center;
  transform: rotate(10deg);
}
.banner-watermark .logo-icon {
  margin: 0 auto 10px;
  width: 88px;
  height: 88px;
  box-shadow: none;
  background: transparent;
}
.banner-watermark .logo-icon svg {
  width: 52px;
  height: 52px;
}
.banner-watermark-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.banner-watermark-tagline {
  margin-top: 6px;
  font-size: 14px;
  color: #64748b;
  letter-spacing: 0.18em;
}
.hero-summary {
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
  border-radius: 14px;
  color: #334155;
  line-height: 1.75;
}
.hero-summary strong {
  color: #0f172a;
}
.deal-badge-container { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.badge-free {
  background: #ef4444;
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
}
.original-price, .current-price, .savings {
  font-size: 40px;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}
.current-price { color: #10b981; font-weight: 900; }
.savings { color: #111827; font-weight: 500; }
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  background: var(--detail-blue);
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 800;
}
.cta-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cta-button-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
.timestamp { margin-top: 10px; color: #64748b; }
.summary-content { line-height: 1.75; color: #334155; }
.deal-verdict-box {
  margin-top: 18px;
  border: 1px solid var(--detail-border);
  border-radius: 12px;
  padding: 20px 24px;
  background: #fafcff;
}
.deal-verdict-box h3 {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.4;
}
.verdict-metrics {
  display: grid;
  gap: 14px;
}
.verdict-metrics p {
  margin: 0;
  line-height: 1.75;
}
.feature-highlights {
  margin: 18px 0 0;
  padding-left: 1.25rem;
  line-height: 1.8;
  text-align: left;
  list-style-position: outside;
}
.feature-highlights li + li {
  margin-top: 8px;
}
.feature-highlights li {
  padding-left: 4px;
}
.editor-note {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  color: #334155;
  line-height: 1.8;
  text-align: left;
  box-shadow: none;
}
.editor-note strong {
  color: #111827;
}
.specs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.spec-item { border: 1px solid var(--detail-border); border-radius: 10px; padding: 10px; background: #fbfdff; }
.spec-item strong { display: block; margin-bottom: 4px; }
.spec-value { color: #334155; word-break: break-word; }
.spec-value a { color: var(--detail-blue); text-decoration: none; font-weight: 700; }
.spec-value a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .container {
    padding: 0 18px;
  }

  header {
    padding: 12px 0;
  }

  .nav-content {
    height: auto;
    min-height: 0;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    justify-content: flex-start;
    max-width: 100%;
  }

  .logo {
    width: calc(100% - 54px);
    min-width: 0;
  }

  .logo-copy {
    min-width: 0;
  }

  .mobile-nav-toggle {
    width: 44px;
    height: 40px;
    margin-left: auto;
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--detail-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    cursor: pointer;
  }

  .mobile-nav-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #475569;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  header.is-mobile-nav-open .mobile-nav-toggle {
    border-color: #cfe3ff;
    background: #eef6ff;
  }

  header.is-mobile-nav-open .mobile-nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  header.is-mobile-nav-open .mobile-nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  header.is-mobile-nav-open .mobile-nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .logo-icon {
    width: 46px;
    height: 46px;
  }

  .logo-title {
    font-size: 24px;
  }

  .logo-tagline {
    max-width: calc(100vw - 120px);
    letter-spacing: 0.16em;
    overflow: hidden;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.35;
  }

  .nav-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .main-nav {
    width: 100%;
    display: none;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--detail-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  }

  .main-nav-link {
    width: auto;
    flex: 1 1 160px;
    min-height: 40px;
    justify-content: center;
    padding: 0 10px;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .main-nav-menu {
    width: 100%;
    flex: 1 1 160px;
  }

  .main-nav-menu-trigger {
    width: 100%;
  }

  .main-nav-menu-list {
    position: static;
    width: 100%;
    margin-top: 8px;
    box-shadow: none;
  }

  main.container {
    padding-top: 22px;
  }

  .card {
    padding: 24px;
  }

  .detail-banner,
  .free-header.detail-banner,
  .card.detail-banner {
    padding: 28px 24px;
  }

  .hero {
    align-items: flex-start;
    gap: 22px;
  }

  .h1 {
    font-size: 38px;
    margin-bottom: 14px;
  }

  .icon {
    width: 128px;
    height: 128px;
    border-radius: 24px;
  }

  .hero-top {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .logo-title {
    font-size: 28px;
  }
  .logo-tagline {
    letter-spacing: 0.18em;
  }
  .banner-main {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-icon {
    width: 140px;
    height: 140px;
    border-radius: 30px;
  }
  .banner-prices,
  .banner-actions {
    grid-column: auto;
  }
  .banner-watermark {
    display: none;
  }
  .banner-prices {
    gap: 18px;
  }
  .banner-copy h1,
  .detail-banner .h1 {
    font-size: 28px;
    width: min(100%, calc(100vw - 96px));
    max-width: 100%;
    word-break: break-all;
  }
  .banner-price-label {
    font-size: 20px;
  }
  .banner-price-value {
    font-size: 32px;
  }
  .banner-highlights {
    margin-top: 30px;
  }
  .banner-highlights {
    grid-template-columns: 1fr;
  }

  .detail-breadcrumbs {
    gap: 6px;
  }

  .nav-right {
    width: 100%;
    justify-content: flex-start;
  }

  .region-switcher {
    width: 100%;
  }

  .nav-right {
    display: none;
    padding: 10px;
    border: 1px solid var(--detail-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  }

  header.is-mobile-nav-open .main-nav,
  header.is-mobile-nav-open .nav-right {
    display: flex;
  }

  .region-switcher-trigger {
    width: 100%;
    justify-content: space-between;
  }

  .region-name {
    flex: 1;
    text-align: left;
  }

  .region-switcher-menu {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .site-footer {
    margin-top: 40px;
  }

  .site-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .footer-legal {
    grid-column: 1 / -1;
  }

  .region-select,
  .lang-select {
    flex: 1 1 160px;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 18px;
  }

  .main-nav {
    gap: 8px;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
  }
}

/* History panel (single arrow, interactive chart) */
details.history-panel { margin-top: 10px; }
summary.toggle-history {
  cursor: pointer;
  color: #111827;
  font-weight: 700;
  user-select: none;
  list-style: none;
  display: block; /* avoid native marker duplication across browsers */
}
details.history-panel > summary.toggle-history { list-style: none; }
summary.toggle-history::-webkit-details-marker { display: none; }
summary.toggle-history::marker { content: ""; }
summary.toggle-history::before {
  content: "\25B6";
  display: inline-block;
  margin-right: 8px;
  color: #64748b;
  transform: translateY(-1px);
}
details[open] > summary.toggle-history::before { content: "\25BC"; }

.chart-range-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin: 4px 0 8px 0;
  flex-wrap: wrap;
}
.chart-tab {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.chart-tab.active { background: #dbeafe; color: var(--detail-blue); border-color: #cbd5e1; }

.price-chart-wrap { position: relative; margin-top: 10px; }
.price-chart {
  height: 240px;
  border: 1px solid var(--detail-border);
  border-radius: 12px;
  background: #fff;
}
.chart-tip {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #1f2937;
  color: #fff;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 14px;
  pointer-events: none;
  display: none;
}

.price-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.price-table th, .price-table td { border-bottom: 1px solid var(--detail-border); text-align: left; padding: 10px 8px; }

/* Reviews */
.reviews-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.rating-num { font-size: 44px; font-weight: 800; line-height: 1; }
.rating-stars { color: var(--detail-star); font-size: 24px; }
.current-mark { font-weight: 800; letter-spacing: .02em; color: #111827; }
.write-review-btn {
  border: 1px solid #3b82f6;
  color: #2563eb;
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.review-item { padding: 12px 0; border-bottom: 1px solid var(--detail-border); }
.review-item p { margin: 8px 0 0 0; white-space: pre-wrap; word-break: break-word; }
.review-date { float: right; color: #94a3b8; }
.review-stars { color: var(--detail-star); }
.review-title { font-weight: 700; margin-top: 6px; color: #1f2937; }
.review-tabs { display: flex; gap: 8px; margin: 18px 0 10px; border-bottom: 1px solid var(--detail-border); }
.review-tab-button { border: 0; background: transparent; color: #64748b; font-weight: 800; padding: 10px 14px; cursor: pointer; border-bottom: 3px solid transparent; }
.review-tab-button.active { color: var(--detail-blue); border-bottom-color: var(--detail-blue); }
.review-tab-panel { display: none; }
.review-tab-panel.active { display: block; }
.more-wrap { text-align: center; padding-top: 12px; }

/* Related */
.app-recommendation-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 12px; row-gap: 18px; align-items: start; }
.app-card { border: 1px solid var(--detail-border); border-radius: 12px; padding: 12px; background: #fff; box-sizing: border-box; }
.app-card-header { display: flex; gap: 10px; align-items: flex-start; min-height: 58px; }
.mini-icon { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid var(--detail-border); background: #f3f4f6; }
.app-card-meta { min-width: 0; flex: 1; }
.app-link { display: block; text-decoration: none; }
.app-card-meta h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  min-height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.app-card-meta .app-tag { color: #64748b; font-size: 12px; }
.app-card-pricing { margin-top: 6px; display: flex; align-items: center; gap: 8px; min-height: 22px; }
.price-status { display: inline-block; background: #eef2ff; color: #4338ca; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.price-value { font-weight: 700; }
.app-brief {
  margin: 6px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.view-deal-btn { display: inline-block; text-decoration: none; font-weight: 700; margin-top: 6px; }
