/* YonoSultan — Mobile Editorial + Royal Luxury */

:root {
  --ys-ivory: #f5f0e7;
  --ys-ink: #302333;
  --ys-gold: #c99b53;
  --ys-garnet: #a84b4c;
  --ys-sand: #e5d9c9;
  --ys-ink-soft: rgba(48, 35, 51, 0.72);
  --ys-ink-faint: rgba(48, 35, 51, 0.08);
  --ys-radius-sm: 8px;
  --ys-space: 12px;
  --ys-space-md: 16px;
  --ys-space-lg: 22px;
  --ys-max: 720px;
  --ys-max-wide: 1100px;
  --ys-home-main: 700px;
  --ys-home-aside: 320px;
  --ys-home-gap: 28px;
  --ys-radius: 13px;
  --ys-font-display: "Cormorant Garamond", "Times New Roman", serif;
  --ys-font-body: "Manrope", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  font-family: var(--ys-font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ys-ink);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(201, 155, 83, 0.12), transparent 55%),
    radial-gradient(90% 60% at 0% 20%, rgba(168, 75, 76, 0.08), transparent 50%),
    var(--ys-ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ys-garnet);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(245, 240, 231, 0.94);
  border-bottom: 1px solid var(--ys-sand);
}

.site-header__inner {
  max-width: var(--ys-max-wide);
  margin: 0 auto;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  color: inherit;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-brand__text {
  font-family: var(--ys-font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ys-ink);
  line-height: 1;
}

.site-brand__text span {
  color: var(--ys-gold);
}

.site-brand--footer .site-brand__text {
  color: var(--ys-ivory);
  font-size: 1.35rem;
}

.site-logo-img {
  display: block;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  max-width: none;
  border-radius: 10px;
  object-fit: cover;
  background: #0d2a1c;
}

.site-logo-img--header {
  width: 44px;
  height: 44px;
}

.site-logo-img--footer {
  width: 52px;
  height: 52px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 36px;
  border: 1px solid var(--ys-sand);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ys-ink);
  border-radius: 1px;
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
}

.site-nav__list a {
  color: var(--ys-ink-soft);
  text-decoration: none;
  font-weight: 600;
}

.site-nav__list a:hover {
  color: var(--ys-ink);
}

@media (max-width: 719px) {
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(245, 240, 231, 0.98);
    border-bottom: 1px solid var(--ys-sand);
    padding: 8px 14px 12px;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-header {
    position: sticky;
  }

  .site-header__inner {
    position: relative;
    flex-wrap: wrap;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__list a {
    display: block;
    padding: 10px 4px;
    border-bottom: 1px solid var(--ys-sand);
  }
}

/* Footer */
.site-footer {
  margin-top: 24px;
  background: var(--ys-ink);
  color: var(--ys-ivory);
}

.site-footer__inner {
  max-width: var(--ys-max-wide);
  margin: 0 auto;
  padding: 22px 14px 26px;
  text-align: center;
}

.site-footer__logo-link {
  display: inline-flex;
  justify-content: center;
  margin-bottom: 10px;
  text-decoration: none;
}

.site-brand--footer {
  justify-content: center;
}

.site-footer__about {
  margin: 0 auto 12px;
  max-width: 34rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(245, 240, 231, 0.72);
}

.site-footer__nav,
.site-footer__legal {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  font-size: 0.78rem;
}

.site-footer__nav a,
.site-footer__legal a {
  color: var(--ys-gold);
  text-decoration: none;
}

.site-footer__copy {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: rgba(245, 240, 231, 0.5);
}

/* App single shell — same content width as homepage */
.app-single {
  max-width: var(--ys-max-wide);
  margin: 0 auto;
  padding: 14px 14px 32px;
  width: 100%;
  box-sizing: border-box;
}

.app-hero {
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--ys-sand);
  margin-bottom: 14px;
}

.app-hero__identity {
  display: grid;
  gap: 12px;
  align-items: center;
}

.app-hero__identity--has-logo {
  grid-template-columns: 64px minmax(0, 1fr);
}

.app-hero__logo img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--ys-sand);
  background: #fff;
  box-shadow: 0 4px 14px rgba(48, 35, 51, 0.08);
}

.app-hero__name {
  margin: 0 0 2px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ys-gold);
  font-weight: 700;
}

.app-hero__titles {
  min-width: 0;
}

.app-hero__h1 {
  margin: 0;
  font-family: var(--ys-font-display);
  font-size: 1.35rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ys-ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Compact meta bar — columns adapt to filled items only */
.app-meta-bar {
  list-style: none;
  margin: 12px 0 0;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 6px;
  background: rgba(48, 35, 51, 0.94);
  border-radius: var(--ys-radius-sm);
  color: var(--ys-ivory);
}

.app-meta-bar--count-1 {
  grid-template-columns: 1fr;
}

.app-meta-bar--count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-meta-bar--count-3,
.app-meta-bar--count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-meta-bar li {
  text-align: center;
  padding: 4px 2px;
  min-width: 0;
}

.app-meta-bar__label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 240, 231, 0.62);
  margin-bottom: 2px;
}

.app-meta-bar strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ys-gold);
  word-break: break-word;
}

.app-hero__actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: var(--ys-font-body);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.btn:active {
  transform: scale(0.98);
}

.btn--download {
  background: linear-gradient(135deg, var(--ys-gold), #b8863f);
  color: var(--ys-ink);
  box-shadow: 0 6px 16px rgba(201, 155, 83, 0.35);
}

.btn--guide {
  background: transparent;
  color: var(--ys-ink);
  border-color: var(--ys-sand);
}

/* Content blocks */
.app-body {
  display: grid;
  gap: 12px;
}

.app-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--ys-sand);
  border-radius: var(--ys-radius);
  padding: 14px 14px 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.app-block h2 {
  margin: 0 0 8px;
  font-family: var(--ys-font-display);
  font-size: 1.22rem;
  line-height: 1.25;
  color: var(--ys-ink);
}

.app-block__content {
  color: var(--ys-ink-soft);
  font-size: 0.94rem;
}

.app-block__content p {
  margin: 0 0 0.7em;
}

.app-block__content p:last-child {
  margin-bottom: 0;
}

.app-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.app-feature-list li {
  position: relative;
  padding: 8px 10px 8px 28px;
  background: var(--ys-ink-faint);
  border-radius: var(--ys-radius-sm);
  font-size: 0.9rem;
}

.app-feature-list li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--ys-gold);
}

.app-bonus-highlight {
  display: inline-block;
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(168, 75, 76, 0.12);
  color: var(--ys-garnet);
  font-weight: 700;
  font-size: 0.88rem;
}

.app-bonus-terms {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--ys-ink-soft);
}

.app-bonus-facts {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.app-bonus-facts li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--ys-radius-sm);
  background: rgba(48, 35, 51, 0.04);
  border: 1px solid var(--ys-sand);
}

.app-bonus-facts__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ys-gold);
}

.app-bonus-facts__value {
  font-size: 0.88rem;
  color: var(--ys-ink-soft);
  line-height: 1.4;
}

.app-reviewed {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: var(--ys-radius-sm);
  border: 1px dashed var(--ys-sand);
  background: rgba(255, 255, 255, 0.35);
  color: var(--ys-ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.app-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  counter-reset: none;
}

.app-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px;
  border-radius: var(--ys-radius-sm);
  background: rgba(48, 35, 51, 0.04);
  font-size: 0.9rem;
}

.app-steps__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ys-ink);
  color: var(--ys-gold);
  font-size: 0.78rem;
  font-weight: 700;
}

.app-problem,
.app-faq {
  border: 1px solid var(--ys-sand);
  border-radius: var(--ys-radius-sm);
  background: #fff;
  margin-bottom: 8px;
  overflow: hidden;
}

.app-problem:last-child,
.app-faq:last-child {
  margin-bottom: 0;
}

.app-problem summary,
.app-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.app-faq__q {
  flex: 1 1 auto;
  min-width: 0;
}

.app-faq__chevron {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-right: 2px solid var(--ys-gold);
  border-bottom: 2px solid var(--ys-gold);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.app-problem[open] .app-faq__chevron,
.app-faq[open] .app-faq__chevron {
  transform: rotate(-135deg);
  margin-top: 8px;
}

.app-block[id] {
  scroll-margin-top: 72px;
}

.app-problem summary::-webkit-details-marker,
.app-faq summary::-webkit-details-marker {
  display: none;
}

.app-problem summary::marker,
.app-faq summary::marker {
  content: "";
}

.app-problem__fix,
.app-faq__answer {
  padding: 0 12px 10px;
  color: var(--ys-ink-soft);
  font-size: 0.88rem;
}

.app-install-safety {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--ys-radius-sm);
  border: 1px solid var(--ys-sand);
  background: rgba(201, 155, 83, 0.1);
  color: var(--ys-ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Fallback pages (NOT homepage — homepage uses .home-page full width shell) */
.site-main:not(.app-single):not(.home-page) {
  max-width: var(--ys-max-wide);
  margin: 0 auto;
  padding: 18px 14px;
}

.home-page {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

/* Desktop expansion */
@media (min-width: 720px) {
  body {
    font-size: 16px;
  }

  .site-header__inner {
    padding: 12px 20px;
  }

  .app-single {
    max-width: var(--ys-max-wide);
    padding: 20px 20px 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .app-detail {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }

  /* When body sections are empty, keep the info card from sitting alone on the far left */
  .app-detail:not(:has(.app-body .app-block)) {
    grid-template-columns: minmax(280px, 420px);
    justify-content: start;
  }

  .app-hero {
    position: sticky;
    top: 64px;
    margin-bottom: 0;
    padding: 16px;
    border: 1px solid var(--ys-sand);
    border-radius: var(--ys-radius);
    background: rgba(255, 255, 255, 0.55);
    border-bottom: 1px solid var(--ys-sand);
  }

  .app-hero__identity--has-logo {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .app-hero__logo img {
    width: 72px;
    height: 72px;
  }

  .app-hero__h1 {
    font-size: 22px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .app-hero__name {
    margin-bottom: 6px;
  }

  .app-hero__titles {
    min-width: 0;
  }

  .app-meta-bar--count-3,
  .app-meta-bar--count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-hero__actions {
    grid-template-columns: 1fr;
  }

  .app-body {
    gap: 14px;
  }

  .app-card {
    padding: 16px 18px 14px;
  }

  .app-block h2 {
    font-size: 1.35rem;
  }
}

/* Mobile detail: single column, hero above body — never dual-column */
@media (max-width: 719px) {
  .app-detail {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .app-hero {
    position: static;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .app-body {
    width: 100%;
    max-width: 100%;
  }

  .app-hero__identity--has-logo {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
  }

  .app-hero__logo img {
    width: 56px;
    height: 56px;
  }

  .app-hero__actions {
    grid-template-columns: 1fr;
  }

  .site-header__inner {
    min-height: 48px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .site-logo-img--header {
    width: 40px;
    height: 40px;
  }
}

/* Target phones: 360 / 390 / 430 */
@media (max-width: 359px) {
  .app-single {
    padding: 12px 12px 28px;
  }

  .app-hero__h1 {
    font-size: 1.15rem;
  }

  .app-meta-bar--count-3,
  .app-meta-bar--count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 360px) and (max-width: 389px) {
  .app-single {
    padding: 14px 14px 32px;
  }

  .app-hero__h1 {
    font-size: 1.2rem;
  }

  .app-meta-bar--count-3,
  .app-meta-bar--count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 390px) and (max-width: 429px) {
  .app-hero__h1 {
    font-size: 1.28rem;
  }

  .app-meta-bar--count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 430px) and (max-width: 719px) {
  .app-hero__h1 {
    font-size: 1.32rem;
  }

  .app-meta-bar--count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ========== Home page ========== */
.home-wrap,
.home-layout,
.search-page .home-wrap,
.archive-apps .home-wrap {
  max-width: var(--ys-max-wide);
  margin: 0 auto;
  padding-left: 14px;
  padding-right: 14px;
}

.home-page {
  padding-bottom: 8px;
}

.home-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.home-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  position: static;
  height: auto;
  min-width: 0;
}

/* Mobile: Updates before Guides / Responsible (DOM order is Guides → Responsible → Updates) */
.home-sidebar .home-updates {
  order: -1;
}

.app-rank-item--desktop-only,
.updates-item--desktop-only {
  display: none;
}

.home-intro {
  padding: 24px 0 8px;
}

.home-intro__title {
  margin: 0 0 6px;
  font-family: var(--ys-font-display);
  font-size: 1.7rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--ys-ink);
  max-width: 16ch;
}

.home-intro__lead {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--ys-ink-soft);
  max-width: 36ch;
}

.home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.home-search__input {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--ys-sand);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ys-ink);
  font: inherit;
}

.home-search__input:focus {
  outline: 2px solid rgba(201, 155, 83, 0.45);
  outline-offset: 1px;
}

.home-search__btn {
  border: 0;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--ys-gold), #b8863f);
  color: var(--ys-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.home-section {
  padding: 14px 0 4px;
}

.home-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.home-section__title {
  margin: 0;
  font-family: var(--ys-font-display);
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--ys-ink);
}

.home-section__more {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ys-garnet);
  text-decoration: none;
  white-space: nowrap;
  overflow: visible;
  padding-left: 8px;
}

.home-section__head .home-section__title {
  flex: 1 1 auto;
  min-width: 0;
}

.home-section__head--on-dark .home-section__title {
  color: var(--ys-ivory);
}

.home-empty {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed var(--ys-sand);
  border-radius: var(--ys-radius-sm);
  background: rgba(255, 255, 255, 0.35);
  color: var(--ys-ink-soft);
  font-size: 0.86rem;
}

.home-empty--compact {
  padding: 8px 12px;
  font-size: 0.8rem;
}

.home-empty--on-dark {
  border-color: rgba(245, 240, 231, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 240, 231, 0.7);
}

/* Category rail */
.cat-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 0 -14px;
  padding-left: 14px;
  padding-right: 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cat-rail::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ys-ink);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--ys-sand);
  font-size: 0.8rem;
  font-weight: 700;
}

.cat-chip__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(48, 35, 51, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ys-garnet);
}

.cat-chip__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Popular rank list */
.app-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: none;
}

.app-rank-item {
  margin: 0;
  width: 100%;
}

.app-rank-item__link {
  display: grid;
  grid-template-columns: 24px 50px minmax(0, 1fr) 20px;
  gap: 10px;
  align-items: center;
  min-height: 74px;
  max-height: 78px;
  height: 74px;
  padding: 0 12px;
  box-sizing: border-box;
  border-radius: var(--ys-radius);
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--ys-sand);
  width: 100%;
}

.app-rank-item__num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ys-gold);
  text-align: center;
}

.app-rank-item__logo {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.app-rank-item__logo img,
.app-rank-item__logo-fallback {
  width: 50px;
  height: 50px;
  max-width: none;
  border-radius: 12px;
  object-fit: cover;
}

.app-rank-item__logo-fallback {
  display: block;
  background: linear-gradient(135deg, var(--ys-sand), #d8cbb8);
}

.app-rank-item__meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.app-rank-item__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ys-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-rank-item__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--ys-ink-soft);
}

.app-rank-item__rating {
  font-size: 12px;
  color: var(--ys-garnet);
  font-weight: 700;
}

.app-rank-item__rating::before {
  content: "★ ";
  color: var(--ys-gold);
}

.app-rank-item__go {
  color: var(--ys-gold);
  font-weight: 700;
  text-align: center;
}

.home-popular .home-section__head {
  margin-bottom: 12px;
}

/* Updates panel */
.updates-panel {
  background: var(--ys-ink);
  color: var(--ys-ivory);
  border-radius: var(--ys-radius);
  padding: 14px;
}

.updates-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.updates-item__link {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: var(--ys-radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 240, 231, 0.08);
  text-decoration: none;
  color: inherit;
}

.updates-item__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ys-gold);
  line-height: 1.3;
}

.updates-item__text {
  font-size: 13px;
  color: rgba(245, 240, 231, 0.72);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-section__more--on-dark {
  color: var(--ys-gold);
  font-size: 0.75rem;
}

.updates-item__date {
  font-size: 11.5px;
  color: rgba(245, 240, 231, 0.45);
}

/* Guides */
.guide-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -14px;
  padding: 0 14px 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.guide-rail::-webkit-scrollbar {
  display: none;
}

.guide-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--ys-radius-sm);
  text-decoration: none;
  color: var(--ys-ink);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--ys-sand);
  font-size: 0.82rem;
  font-weight: 700;
}

.guide-chip__arrow {
  color: var(--ys-gold);
}

/* Responsible */
.responsible-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--ys-radius);
  border: 1px solid var(--ys-sand);
  background: rgba(168, 75, 76, 0.08);
  min-width: 0;
}

.responsible-card__badge {
  width: 44px;
  height: 44px;
  min-width: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ys-ink);
  color: var(--ys-gold);
  font-weight: 700;
  font-size: 0.85rem;
}

.responsible-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.responsible-card__title {
  margin: 0 0 4px;
  font-family: var(--ys-font-display);
  font-size: 1.1rem;
  line-height: 1.25;
}

.responsible-card__text {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ys-ink-soft);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: normal;
}

.search-page,
.archive-apps {
  padding: 16px 0 28px;
}

.search-page__head {
  margin-bottom: 14px;
}

.search-page__title {
  margin: 0 0 12px;
  font-family: var(--ys-font-display);
  font-size: 1.4rem;
}

.search-page__desc {
  margin: 0 0 12px;
  color: var(--ys-ink-soft);
  font-size: 0.9rem;
}

@media (min-width: 360px) and (max-width: 389px) {
  .home-intro__title {
    font-size: 1.55rem;
  }
}

@media (min-width: 390px) and (max-width: 429px) {
  .home-intro__title {
    font-size: 1.65rem;
  }

  .home-wrap,
  .home-layout,
  .search-page .home-wrap,
  .archive-apps .home-wrap {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (min-width: 430px) and (max-width: 719px) {
  .home-wrap,
  .home-layout,
  .search-page .home-wrap,
  .archive-apps .home-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Tablet: still single column — dual column only from 1024px */
@media (min-width: 720px) and (max-width: 1023px) {
  .home-wrap,
  .home-layout,
  .search-page .home-wrap,
  .archive-apps .home-wrap,
  .site-header__inner,
  .site-footer__inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .home-intro {
    padding-top: 24px;
  }

  .home-intro__title {
    font-size: 2rem;
    max-width: none;
  }

  .home-intro__lead {
    font-size: 1rem;
    max-width: 42ch;
  }

  .home-search {
    max-width: 640px;
  }

  .cat-rail {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
    flex-wrap: wrap;
  }

  .guide-rail {
    margin: 0;
    padding: 0;
    overflow: visible;
    flex-wrap: wrap;
  }

  .site-brand__text {
    font-size: 1.3rem;
  }
}

/* Desktop dual column: main (~700) + sidebar (320) inside 1100 */
@media (min-width: 1024px) {
  .home-wrap,
  .home-layout,
  .search-page .home-wrap,
  .archive-apps .home-wrap,
  .site-header__inner {
    max-width: var(--ys-max-wide);
    padding-left: 24px;
    padding-right: 24px;
    margin-left: auto;
    margin-right: auto;
  }

  .site-footer__inner {
    max-width: var(--ys-max-wide);
    padding-left: 24px;
    padding-right: 24px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .home-intro {
    padding-top: 28px;
    padding-bottom: 10px;
  }

  .home-intro__title {
    font-size: 2.2rem;
    max-width: none;
  }

  .home-intro__lead {
    font-size: 1rem;
    max-width: 48ch;
  }

  .home-search {
    max-width: 700px;
  }

  .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--ys-home-aside);
    column-gap: var(--ys-home-gap);
    row-gap: 0;
    align-items: start;
    padding-top: 8px;
    padding-bottom: 24px;
    width: 100%;
    max-width: var(--ys-max-wide);
    box-sizing: border-box;
  }

  .home-main {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 26px; /* Browse Categories → Popular Apps ~24–28px */
    min-width: 0;
  }

  .home-sidebar {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    align-self: start;
    position: static;
    height: auto;
    width: 100%;
    max-width: var(--ys-home-aside);
    min-width: 0;
  }

  /* Desktop order: Guides → Responsible → Updates (reset mobile order) */
  .home-sidebar .home-guides,
  .home-sidebar .home-responsible,
  .home-sidebar .home-updates {
    order: 0;
    position: static;
    top: auto;
    transform: none;
    margin-top: 0;
    z-index: auto;
  }

  /* Responsible → App Updates ~24px (16px gap + 8px) */
  .home-sidebar .home-updates {
    margin-top: 8px;
  }

  .app-rank-item--desktop-only,
  .updates-item--desktop-only {
    display: list-item;
  }

  .home-popular,
  .home-popular .app-rank-list,
  .home-popular .app-rank-item,
  .home-popular .app-rank-item__link {
    width: 100%;
    max-width: none;
  }

  .cat-rail {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
    flex-wrap: wrap;
    gap: 8px 10px;
  }

  .guide-rail {
    margin: 0;
    padding: 0;
    overflow: visible;
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .guide-chip {
    width: 100%;
    justify-content: space-between;
  }

  .home-section {
    padding-top: 0;
    margin-top: 0;
  }

  .home-categories {
    margin-bottom: 0;
  }

  .home-popular .home-section__head {
    margin-bottom: 12px; /* title → first card ~12–14px */
  }

  .home-popular .app-rank-list {
    gap: 10px;
  }

  .home-updates .updates-panel {
    max-width: none;
    padding: 12px;
  }

  .home-updates .updates-item__link {
    padding: 8px 9px;
    gap: 2px;
  }

  .home-updates .updates-item__name {
    font-size: 14px;
  }

  .home-updates .updates-item__text {
    font-size: 13px;
    -webkit-line-clamp: 3;
  }

  .home-updates .updates-item__date {
    font-size: 11.5px;
  }

  .site-brand__text {
    font-size: 1.35rem;
  }
}

/* Mobile reading scale for app detail */
@media (max-width: 719px) {
  .app-single {
    font-size: 14.5px;
  }

  .app-block h2 {
    font-size: 1.2rem; /* ~19px */
    line-height: 1.3;
  }

  .app-block__content,
  .app-faq__answer,
  .app-problem__fix {
    font-size: 14.5px;
  }

  .app-feature-list li {
    font-size: 13.5px;
  }

  .app-faq summary,
  .app-problem summary {
    font-size: 14px;
  }

  .app-body {
    gap: 14px;
  }

  .btn {
    min-height: 46px;
  }

  .home-page,
  .home-layout,
  .app-single {
    overflow-x: clip;
    max-width: 100%;
  }
}
