/* YonoRank – mobile-first design system */
:root {
  --yr-bg: #f5f7f6;
  --yr-surface: #ffffff;
  --yr-ink: #14201b;
  --yr-muted: #5b6b63;
  --yr-line: #d7e0db;
  --yr-brand: #0b6e4f;
  --yr-brand-2: #148f63;
  --yr-accent: #e89a3c;
  --yr-danger: #b42318;
  --yr-ok: #027a48;
  --yr-shadow: 0 8px 24px rgba(11, 40, 28, 0.08);
  --yr-radius: 14px;
  --yr-radius-sm: 10px;
  --yr-space: 12px;
  --yr-max: 1100px;
  --yr-font: "Trebuchet MS", "Segoe UI", "Gill Sans", sans-serif;
  --yr-display: "Trebuchet MS", "Gill Sans", "Lucida Grande", sans-serif;
  --yr-header-h: calc(64px + 0.3cm);
}

html[data-theme="dark"] {
  --yr-bg: #0f1412;
  --yr-surface: #18211d;
  --yr-ink: #e8efeb;
  --yr-muted: #9aaba2;
  --yr-line: #2a3831;
  --yr-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--yr-font);
  color: var(--yr-ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(20, 143, 99, 0.12), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(232, 154, 60, 0.10), transparent 50%),
    var(--yr-bg);
  line-height: 1.45;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--yr-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--yr-display);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

.yr-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--yr-brand);
  color: #fff;
  padding: 8px 12px;
  z-index: 10000;
}
.yr-skip:focus { left: 8px; top: 8px; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.yr-container {
  width: min(100% - 24px, var(--yr-max));
  margin-inline: auto;
}

.yr-main { padding-bottom: 40px; min-height: 60vh; }

/* Header */
.yr-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--yr-surface) 88%, transparent);
  border-bottom: 1px solid var(--yr-line);
}
.yr-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--yr-header-h);
}
.yr-brand {
  flex: 0 0 auto;
  max-width: min(calc(220px + 0.3cm), 72vw);
  z-index: 1;
}
.yr-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  line-height: 0;
}
.yr-brand__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}
.yr-brand__logo--full {
  width: auto;
  height: calc(55px + 0.3cm);
  max-width: 100%;
  max-height: calc(55px + 0.3cm);
  border-radius: 0;
  object-fit: contain;
  object-position: left center;
  display: block;
}
.yr-header .custom-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.yr-header .custom-logo-link img {
  width: auto;
  height: calc(55px + 0.3cm);
  max-width: min(calc(220px + 0.3cm), 72vw);
  object-fit: contain;
}
.yr-brand__name {
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.yr-nav--desktop {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
}
.yr-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.yr-menu a {
  color: var(--yr-ink);
  font-weight: 600;
  font-size: calc(0.92rem + 0.1cm);
  text-decoration: none;
  padding: 6px 0;
}
.yr-menu a:hover { color: var(--yr-brand); }
.yr-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 1;
}
.yr-icon-btn {
  border: 0;
  background: transparent;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.yr-icon-btn:hover { background: color-mix(in srgb, var(--yr-brand) 10%, transparent); }
.yr-theme-icon--sun { display: none; }
html[data-theme="dark"] .yr-theme-icon--moon { display: none; }
html[data-theme="dark"] .yr-theme-icon--sun { display: block; }

.yr-search-panel {
  border-top: 1px solid var(--yr-line);
  padding: 12px 0 14px;
  background: var(--yr-surface);
}
.yr-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.yr-search input,
.yr-filters input,
.yr-filters select,
.yr-contact-form input,
.yr-contact-form textarea {
  width: 100%;
  border: 1px solid var(--yr-line);
  background: var(--yr-bg);
  color: var(--yr-ink);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.yr-live-results {
  margin-top: 8px;
  background: var(--yr-bg);
  border: 1px solid var(--yr-line);
  border-radius: 12px;
  overflow: hidden;
}
.yr-live-results a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--yr-line);
}
.yr-live-results a:last-child { border-bottom: 0; }
.yr-live-results img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

/* Drawer */
.yr-drawer[hidden] { display: none !important; }
.yr-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
}
.yr-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}
.yr-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(86vw, 320px);
  height: 100%;
  background: var(--yr-surface);
  padding: 16px;
  box-shadow: var(--yr-shadow);
  transform: translateX(0);
  animation: yrSlide .22s ease;
}
@keyframes yrSlide {
  from { transform: translateX(16px); opacity: .6; }
  to { transform: translateX(0); opacity: 1; }
}
.yr-drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 800;
}
.yr-menu--drawer {
  flex-direction: column;
  gap: 0;
}
.yr-menu--drawer a {
  display: block;
  padding: 12px 4px;
  border-bottom: 1px solid var(--yr-line);
}

/* Buttons */
.yr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
}
.yr-btn--primary {
  background: linear-gradient(135deg, var(--yr-brand), var(--yr-brand-2));
  color: #fff;
}
.yr-btn--ghost {
  background: transparent;
  border-color: var(--yr-line);
  color: var(--yr-ink);
}
.yr-btn--sm { min-height: 34px; padding: 0 12px; font-size: 0.86rem; }
.yr-text-link { font-weight: 700; }

/* Sections */
.yr-section { padding: 18px 0; }
.yr-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.yr-section__title {
  font-size: 1.2rem;
  margin: 0;
}
.yr-section__link { font-size: 0.9rem; font-weight: 700; }
.yr-subtitle {
  font-size: 1rem;
  margin: 0 0 10px;
  color: var(--yr-muted);
}
.yr-eyebrow {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--yr-accent);
}

/* Hero */
.yr-hero__card {
  position: relative;
  border-radius: calc(var(--yr-radius) + 4px);
  overflow: hidden;
  background: var(--yr-surface);
  box-shadow: var(--yr-shadow);
  border: 1px solid var(--yr-line);
}
.yr-hero__banner {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.yr-hero__content {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 14px;
  align-items: start;
}
.yr-hero__icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin-top: -36px;
  border: 3px solid var(--yr-surface);
  box-shadow: var(--yr-shadow);
  object-fit: cover;
}
.yr-hero__title { font-size: 1.45rem; margin-bottom: 4px; }
.yr-hero__desc { margin: 0 0 8px; color: var(--yr-muted); font-size: 0.95rem; }
.yr-hero__meta,
.yr-card__meta,
.yr-charts__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-bottom: 10px;
}
.yr-hero__actions,
.yr-card__actions,
.yr-app-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Cards */
.yr-grid--cards {
  display: grid;
  gap: 10px;
}
.yr-card {
  background: var(--yr-surface);
  border: 1px solid var(--yr-line);
  border-radius: var(--yr-radius);
  padding: 10px;
  box-shadow: var(--yr-shadow);
}
.yr-card__link {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  align-items: start;
}
.yr-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}
.yr-card__title {
  font-size: 0.98rem;
  margin: 0 0 4px;
}
.yr-card__actions { margin-top: 8px; }
.yr-badge {
  display: inline-flex;
  align-items: center;
  background: color-mix(in srgb, var(--yr-accent) 18%, transparent);
  color: #8a4b00;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}
html[data-theme="dark"] .yr-badge { color: #ffd39a; }
.yr-cat {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--yr-brand) 12%, transparent);
  color: var(--yr-brand-2);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}
.yr-installs { font-size: 0.78rem; color: var(--yr-muted); }
.yr-muted { color: var(--yr-muted); }
.yr-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.82rem;
}
.yr-star {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--yr-line);
  display: inline-block;
}
.yr-star.is-full,
.yr-star.is-half { background: var(--yr-accent); }
.yr-stars__value { margin-left: 4px; font-weight: 700; }

/* Categories */
.yr-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.yr-cat-tile {
  position: relative;
  border-radius: var(--yr-radius);
  overflow: hidden;
  min-height: 84px;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--yr-shadow);
}
.yr-cat-tile img {
  width: 100%;
  height: 84px;
  object-fit: cover;
}
.yr-cat-tile span {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
}

/* Charts */
.yr-charts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.yr-charts__item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  background: var(--yr-surface);
  border: 1px solid var(--yr-line);
  border-radius: var(--yr-radius-sm);
  padding: 8px;
}
.yr-charts__rank {
  font-weight: 800;
  text-align: center;
  color: var(--yr-brand);
}
.yr-charts__main {
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.yr-charts__main img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex: 0 0 auto;
}
.yr-charts__info {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.yr-charts__info strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yr-split { display: grid; gap: 18px; }

/* Guides */
.yr-grid--guides {
  display: grid;
  gap: 12px;
}
.yr-guide-card {
  background: var(--yr-surface);
  border: 1px solid var(--yr-line);
  border-radius: var(--yr-radius);
  overflow: hidden;
  box-shadow: var(--yr-shadow);
}
.yr-guide-card__media img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.yr-guide-card__body { padding: 12px; }
.yr-guide-card__title { font-size: 1.05rem; margin: 0 0 6px; }
.yr-guide-card__title a { color: inherit; text-decoration: none; }
.yr-guide-card__excerpt { margin: 0 0 8px; color: var(--yr-muted); font-size: 0.92rem; }
.yr-guide-card__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--yr-muted);
}
.yr-guide-hero {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--yr-radius);
  margin-bottom: 16px;
}

/* Accordion */
.yr-accordion { display: grid; gap: 8px; }
.yr-accordion__item {
  background: var(--yr-surface);
  border: 1px solid var(--yr-line);
  border-radius: var(--yr-radius-sm);
  padding: 0 12px;
}
.yr-accordion__item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 0;
  list-style: none;
}
.yr-accordion__item summary::-webkit-details-marker { display: none; }
.yr-accordion__content {
  padding: 0 0 12px;
  color: var(--yr-muted);
}

/* Notice */
.yr-notice {
  background: color-mix(in srgb, var(--yr-accent) 10%, var(--yr-surface));
  border-block: 1px solid var(--yr-line);
}
.yr-notice__list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--yr-muted);
}

/* Page / archive */
.yr-page-head { margin: 14px 0 12px; }
.yr-page-title { font-size: 1.55rem; margin: 0 0 6px; }
.yr-page-desc { margin: 0; color: var(--yr-muted); }
.yr-filters {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  background: var(--yr-surface);
  border: 1px solid var(--yr-line);
  border-radius: var(--yr-radius);
  padding: 12px;
}
.yr-filters__row {
  display: grid;
  gap: 8px;
}
.yr-filters label span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--yr-muted);
}
.yr-empty { color: var(--yr-muted); padding: 20px 0; }

/* Single app — shared template shell for every Games post */
.yr-single-game {
  padding-top: 4px;
  padding-bottom: 8px;
}
.yr-app-header {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  margin: 10px 0 18px;
  padding: 12px;
  background: var(--yr-surface);
  border: 1px solid var(--yr-line);
  border-radius: var(--yr-radius);
  box-shadow: var(--yr-shadow);
  align-items: start;
}
.yr-app-header__icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  object-fit: cover;
}
.yr-app-header__title { font-size: 1.4rem; margin: 0 0 2px; }
.yr-app-header__dev {
  margin: 0 0 6px;
  color: var(--yr-muted);
  min-height: 1.35em;
}
.yr-app-header__dev.is-empty { visibility: hidden; }
.yr-app-header__rating {
  min-height: 1.4em;
  margin-bottom: 10px;
}
.yr-app-header__rating.is-empty .yr-muted { font-size: 0.85rem; }
.yr-btn--disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}
.yr-module {
  margin: 0 0 18px;
  padding: 14px;
  background: var(--yr-surface);
  border: 1px solid var(--yr-line);
  border-radius: var(--yr-radius);
}
.yr-module h2 {
  font-size: 1.1rem;
  margin: 0 0 10px;
}
.yr-module .yr-prose > *:last-child { margin-bottom: 0; }
.yr-ratings-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
}
.yr-prose p { margin-top: 0; }
.yr-feature-list {
  margin: 0;
  padding-left: 18px;
}
.yr-feature-list li { margin-bottom: 6px; }
.yr-screens {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 42%);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.yr-screens img {
  border-radius: 12px;
  border: 1px solid var(--yr-line);
  height: 260px;
  width: 100%;
  object-fit: cover;
}
.yr-info-table {
  width: 100%;
  border-collapse: collapse;
}
.yr-info-table th,
.yr-info-table td {
  text-align: left;
  padding: 8px 0;
  border-bottom: 1px solid var(--yr-line);
  vertical-align: top;
}
.yr-info-table th {
  width: 38%;
  color: var(--yr-muted);
  font-weight: 600;
}

/* Breadcrumb */
.yr-breadcrumb { margin: 12px 0 0; font-size: 0.82rem; }
.yr-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--yr-muted);
}
.yr-breadcrumb li:not(:last-child)::after {
  content: "/";
  margin: 0 6px;
  opacity: .6;
}
.yr-breadcrumb a { color: var(--yr-muted); }

/* Pagination */
.yr-pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 16px 0 0;
  margin: 0;
}
.yr-pagination .page-numbers li a,
.yr-pagination .page-numbers li span {
  display: inline-flex;
  min-width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--yr-line);
  background: var(--yr-surface);
  color: inherit;
  text-decoration: none;
  padding: 0 8px;
}
.yr-pagination .current {
  background: var(--yr-brand) !important;
  border-color: var(--yr-brand) !important;
  color: #fff !important;
}

/* Footer */
.yr-footer {
  margin-top: 24px;
  padding: 28px 0 20px;
  background: #0f1a16;
  color: #d7e4dd;
}
.yr-footer a { color: #b7d4c5; }
.yr-footer__grid {
  display: grid;
  gap: 18px;
}
.yr-footer__heading {
  font-size: 0.95rem;
  margin: 0 0 8px;
  color: #fff;
}
.yr-footer__about { color: #a7bdb2; font-size: 0.9rem; }
.yr-footer-menu,
.yr-friend-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.yr-footer-menu { flex-direction: column; gap: 6px; }
.yr-friend-links li { max-width: 100%; }
.yr-friend-links a {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.yr-footer__bottom {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 0.82rem;
  color: #8fa89b;
}

.yr-backtop {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--yr-brand);
  color: #fff;
  display: none;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--yr-shadow);
  z-index: 900;
}
.yr-backtop.is-visible { display: grid; }

.yr-contact-form { display: grid; gap: 10px; max-width: 560px; }
.yr-contact-form label { font-weight: 700; display: block; margin-bottom: 4px; }
.yr-success { color: var(--yr-ok); font-weight: 700; }
.yr-error { color: var(--yr-danger); font-weight: 700; }
.yr-404__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Responsive */
@media (min-width: 768px) {
  .yr-burger { display: none; }
  .yr-nav--desktop { display: flex; align-items: center; }
  .yr-hero__banner { height: 220px; }
  .yr-hero__content { padding: 18px; }
  .yr-grid--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yr-grid--guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yr-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yr-filters__row { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .yr-split { grid-template-columns: 1fr 1fr; }
  .yr-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
  .yr-screens { grid-auto-columns: minmax(180px, 28%); }
}

@media (min-width: 1024px) {
  :root { --yr-header-h: calc(64px + 0.3cm); }
  .yr-section { padding: 24px 0; }
  .yr-section__title { font-size: 1.35rem; }
  .yr-grid--cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yr-grid--guides { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yr-cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .yr-hero__title { font-size: 1.8rem; }
  .yr-app-header { grid-template-columns: 104px 1fr; padding: 18px; }
  .yr-app-header__icon { width: 104px; height: 104px; }
}

@media (min-width: 1366px) {
  .yr-grid--cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Prevent horizontal overflow */
html, body { overflow-x: hidden; }
.yr-no-scroll { overflow: hidden; }
.yr-card__title,
.yr-charts__info strong { overflow-wrap: anywhere; }
