/* Home-only portal layout. Cocoon continues to own the document shell. */

.sosyage-ui.home .sm-portal { display: none; }
.sosyage-ui.home .content { padding: 24px 20px 80px; }
.sosyage-ui.home .content-in.wrap {
  display: block;
  width: min(1180px, 100%);
  max-width: 1180px;
}
.sosyage-ui.home #main {
  float: none;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.sosyage-ui.home #sidebar { display: none; }
.sosyage-ui.home .small-pr-label { display: none; }
.sm-home { color: var(--sm-ink); }
.sm-home * { box-sizing: border-box; }
.sm-home a { text-decoration: none; }

.sm-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.sm-section-heading h1,
.sm-section-heading h2,
.sm-rail-card__heading h2 {
  margin: 0;
  padding: 0;
  color: var(--sm-blue-950);
  background: none;
  border: 0;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.02em;
}
.sm-section-heading h1 { font-size: 27px; }
.sm-section-heading h2 { font-size: 25px; }
.sm-section-heading h2::before,
.sm-section-heading h2::after { display: none; }
.sm-section-heading h2 > span { margin-right: 8px; color: var(--sm-blue-700); }
.sm-section-heading p,
.sm-rail-card__heading p { margin: 4px 0 0; color: var(--sm-muted); font-size: 12px; line-height: 1.6; }
.sm-section-heading > a {
  flex: 0 0 auto;
  color: var(--sm-blue-700);
  font-size: 13px;
  font-weight: 800;
}
.sm-section-heading > a:hover { color: var(--sm-blue-950); }
.sm-kicker {
  margin: 0 0 2px !important;
  color: var(--sm-blue-700) !important;
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: .12em;
}

/* Featured games */
.sm-home-focus { margin-bottom: 38px; }
.sm-section-heading--focus { align-items: center; }
.sm-section-heading--focus > div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 18px; }
.sm-section-heading--focus .sm-kicker { grid-column: 1 / -1; }
.sm-section-heading--focus h1 { white-space: nowrap; }
.sm-focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sm-focus-card {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  color: #fff;
  background: #12253e;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(17, 44, 82, .15);
}
.sm-focus-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.78);
  transform: none;
}
.sm-focus-card__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,19,39,.06) 0%, rgba(6,19,39,.18) 42%, rgba(6,19,39,.68) 72%, rgba(6,19,39,.9) 100%); }
.sm-focus-card__body { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; min-height: 250px; padding: 14px; }
.sm-focus-card__status {
  align-self: flex-start;
  padding: 5px 10px;
  color: #fff;
  background: var(--sm-blue-600);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}
.sm-focus-card--red .sm-focus-card__status { background: #ef315c; }
.sm-focus-card--slate .sm-focus-card__status { background: #2376de; }
.sm-focus-card__copy { margin-top: auto; padding: 54px 2px 8px; }
.sm-focus-card__copy p { overflow: hidden; margin: 0 0 2px; color: rgba(255,255,255,.9); font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.sm-focus-card__copy h2 { margin: 0; padding: 0; background: none; border: 0; font-size: clamp(19px, 1.7vw, 25px); line-height: 1.4; }
.sm-focus-card__copy h2::before,
.sm-focus-card__copy h2::after { display: none; }
.sm-focus-card__copy h2 a { color: #fff; }
.sm-focus-card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 14px;
  color: var(--sm-blue-950);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}
.sm-focus-card__cta .fa-gamepad { color: var(--sm-blue-700); }
.sm-focus-card__cta .fa-arrow-right { margin-left: auto; color: #d8a500; }
.sm-focus-card__cta:hover { color: var(--sm-blue-950); background: #fff; transform: translateY(-1px); }

/* Latest + home rail */
.sm-home-columns { display: grid; grid-template-columns: minmax(0, 2.08fr) minmax(300px, .92fr); gap: 24px; align-items: start; }
.sm-latest-list { border-top: 1px solid var(--sm-line); }
.sm-latest-card {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sm-line);
}
.sm-latest-card__thumb { display: block; height: 100px; overflow: hidden; border-radius: 7px; background: var(--sm-blue-50); }
.sm-latest-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.sm-latest-card:hover .sm-latest-card__thumb img { transform: scale(1.035); }
.sm-latest-card__body { min-width: 0; }
.sm-latest-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sm-latest-card__meta > span {
  max-width: 75%;
  overflow: hidden;
  padding: 3px 9px;
  color: #1464c7;
  background: #dcecff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sm-latest-card__meta time { color: var(--sm-muted); font-size: 10px; white-space: nowrap; }
.sm-latest-card h3 { margin: 5px 0 4px; padding: 0; background: none; border: 0; font-size: 15px; line-height: 1.45; }
.sm-latest-card h3::before,
.sm-latest-card h3::after { display: none; }
.sm-latest-card h3 a { color: var(--sm-blue-950); }
.sm-latest-card h3 a:hover { color: var(--sm-blue-700); }
.sm-latest-card p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--sm-muted); font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.sm-home-rail { display: grid; gap: 14px; }
.sm-about-card,
.sm-rail-card { overflow: hidden; background: #fff; border: 1px solid var(--sm-line); border-radius: 10px; box-shadow: 0 5px 18px rgba(28,61,110,.06); }
.sm-about-card {
  position: relative;
  min-height: 186px;
  padding: 18px 20px;
  color: #fff;
  background: #0756a9;
}
.sm-about-card__eyebrow { margin: 0 0 5px; color: #8ed7ff; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.sm-about-card h2 { margin: 0 0 10px; padding: 0; color: #fff; background: none; border: 0; font-size: 21px; line-height: 1.35; }
.sm-about-card h2::before,
.sm-about-card h2::after { display: none; }
.sm-about-card ul { position: relative; z-index: 1; margin: 0; padding: 0; list-style: none; }
.sm-about-card li { margin: 2px 0; font-size: 10px; }
.sm-about-card li > span { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 6px; color: var(--sm-blue-950); background: var(--sm-yellow); border-radius: 50%; font-size: 8px; }
.sm-about-card__brand { position: relative; z-index: 1; display: block; margin-top: 8px; font-size: 18px; font-weight: 900; }
.sm-about-card__brand span { color: var(--sm-yellow); }
.sm-rail-card { padding: 16px; }
.sm-rail-card__heading { margin-bottom: 12px; }
.sm-rail-card__heading h2 { font-size: 20px; }
.sm-rail-card__heading h2 > span { margin-right: 7px; color: #f3b400; }
.sm-game-directory .sm-rail-card__heading h2 > span { color: var(--sm-blue-700); }
.sm-popular ol { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.sm-popular li { display: grid; grid-template-columns: 27px 64px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--sm-line); }
.sm-popular__rank { display: grid; place-items: center; width: 27px; height: 27px; color: #fff; background: #9aa7b6; border-radius: 5px; font-size: 12px; font-weight: 900; }
.sm-popular li:first-child .sm-popular__rank { background: #efb613; }
.sm-popular li:nth-child(2) .sm-popular__rank { background: #8d9baa; }
.sm-popular li:nth-child(3) .sm-popular__rank { background: #d97d30; }
.sm-popular li > img { width: 64px; height: 43px; object-fit: cover; border-radius: 5px; }
.sm-popular li > div { min-width: 0; }
.sm-popular li > div > span { display: block; overflow: hidden; color: var(--sm-blue-700); font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.sm-popular li a { display: -webkit-box; overflow: hidden; color: var(--sm-blue-950); font-size: 10px; font-weight: 800; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.sm-popular li time { display: block; color: var(--sm-muted); font-size: 8px; text-align: right; }
.sm-game-directory__list { display: grid; gap: 7px; }
.sm-game-directory__list > a { display: grid; grid-template-columns: 86px minmax(0,1fr) 12px; gap: 9px; align-items: center; overflow: hidden; color: var(--sm-blue-700); border: 1px solid var(--sm-line); border-radius: 7px; }
.sm-game-directory__list > a > img { width: 86px; height: 54px; object-fit: cover; }
.sm-game-directory__list strong,
.sm-game-directory__list small { display: block; }
.sm-game-directory__list strong { font-size: 10px; line-height: 1.3; }
.sm-game-directory__list small { margin-top: 2px; font-size: 9px; }
.sm-game-directory__list > a > span:last-child { font-size: 22px; }

/* Game hubs */
.sm-game-hubs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; min-width: 0; margin-top: 36px; }
.sm-game-hub { min-width: 0; padding-left: 14px; border-left: 7px solid var(--sm-blue-700); }
.sm-game-hub--teal { border-color: #0aa69e; }
.sm-game-hub--red { border-color: #ef315c; }
.sm-game-hub--slate { border-color: #587790; }
.sm-guide-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 9px; }
.sm-guide-card { position: relative; min-height: 88px; overflow: hidden; color: var(--sm-blue-950); background: #fff; border: 1px solid var(--sm-line); border-radius: 8px; box-shadow: 0 4px 12px rgba(28,61,110,.06); }
.sm-guide-card > img { width: 100%; height: 36px; object-fit: cover; filter: brightness(.78); }
.sm-guide-card__icon { position: absolute; top: 22px; left: 9px; display: grid; place-items: center; width: 29px; height: 29px; color: #fff; background: var(--sm-blue-600); border: 3px solid #fff; border-radius: 50%; }
.sm-guide-card > span:last-child { display: block; padding: 8px 8px 8px 44px; }
.sm-guide-card strong,
.sm-guide-card small { display: block; }
.sm-guide-card strong { display: -webkit-box; overflow: hidden; font-size: 11px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.sm-guide-card small { margin-top: 2px; color: var(--sm-muted); font-size: 8px; }
.sm-guide-empty { grid-column: 1 / -1; margin: 0; padding: 24px; color: var(--sm-muted); background: rgba(255,255,255,.72); border: 1px dashed var(--sm-line); border-radius: 10px; font-size: 13px; }
.sm-guide-card:hover { border-color: #93bdf5; transform: translateY(-2px); }

@media (min-width: 1360px) {
  .sosyage-ui.home .content-in.wrap {
    width: min(1320px, 100%);
    max-width: 1320px;
  }
}

@media (max-width: 1023px) {
  .sosyage-ui.home .content { padding-inline: 14px; }
  .sm-focus-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sm-focus-card:last-child { grid-column: 1 / -1; }
  .sm-home-columns { grid-template-columns: minmax(0,1.7fr) minmax(280px,.8fr); }
  .sm-latest-card { grid-template-columns: 140px minmax(0,1fr); }
  .sm-guide-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 768px) {
  .sosyage-ui.home .content { padding: 18px 10px 86px; }
  .sm-section-heading { align-items: flex-start; margin-bottom: 14px; }
  .sm-section-heading h1 { font-size: 23px; }
  .sm-section-heading h2 { font-size: 21px; }
  .sm-section-heading--focus > div { display: block; }
  .sm-section-heading--focus > div > p:last-child { margin-top: 3px; }
  .sm-section-heading > a { margin-top: 6px; font-size: 11px; }
  .sm-focus-grid { display: flex; gap: 12px; margin-right: -10px; padding-right: 10px; overflow-x: auto; scroll-snap-type: x mandatory; }
  .sm-focus-card { flex: 0 0 82vw; min-height: 245px; scroll-snap-align: start; }
  .sm-focus-card:last-child { grid-column: auto; }
  .sm-focus-card__copy h2 { font-size: 22px; }
  .sm-home-columns { display: block; }
  .sm-home-rail { margin-top: 28px; }
  .sm-latest-card { grid-template-columns: 116px minmax(0,1fr); gap: 11px; padding: 12px 0; }
  .sm-latest-card__thumb { height: 82px; }
  .sm-latest-card h3 { display: -webkit-box; overflow: hidden; font-size: 13px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .sm-latest-card p { display: none; }
  .sm-latest-card__meta > span { max-width: 68%; font-size: 8px; }
  .sm-popular li { grid-template-columns: 30px 90px minmax(0, 1fr); gap: 10px; padding: 12px 0; }
  .sm-popular__rank { width: 30px; height: 30px; font-size: 13px; }
  .sm-popular li > img { width: 90px; height: 58px; border-radius: 7px; }
  .sm-popular li > div > span { font-size: 10px; }
  .sm-popular li a { font-size: 13px; line-height: 1.45; -webkit-line-clamp: 3; }
  .sm-popular li time { margin-top: 3px; font-size: 10px; }
  .sm-about-card { min-height: 175px; }
  .sm-game-hubs { gap: 24px; margin-top: 30px; }
  .sm-game-hub { padding-left: 9px; border-left-width: 5px; }
  .sm-game-hub .sm-section-heading { display: block; }
  .sm-game-hub .sm-section-heading > a { display: inline-block; margin-top: 6px; }
  .sm-guide-grid { display: flex; width: 100%; min-width: 0; gap: 9px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 2px 2px 10px; scroll-snap-type: x proximity; }
  .sm-guide-card { flex: 0 0 150px; scroll-snap-align: start; }
  .sm-guide-empty { flex: 0 0 100%; }
}

@media (max-width: 420px) {
  .sm-section-heading--focus { display: block; }
  .sm-section-heading--focus > a { display: inline-block; margin-top: 8px; }
  .sm-focus-card { flex-basis: 88vw; }
  .sm-focus-card__cta { font-size: 11px; }
  .sm-latest-card { grid-template-columns: 104px minmax(0,1fr); }
  .sm-latest-card__thumb { height: 76px; }
}

@media (min-width: 769px) {
  .sm-section-heading > div > p:last-child,
  .sm-rail-card__heading p { font-size: 13px; }
  .sm-focus-card__copy p { font-size: 12px; }
  .sm-latest-card h3 { font-size: 16px; }
  .sm-latest-card p { font-size: 12px; }
  .sm-popular li a { font-size: 11px; }
  .sm-game-directory__list strong { font-size: 11px; }
  .sm-game-directory__list small { font-size: 9.5px; }
  .sm-guide-card strong { font-size: 12px; }
  .sm-guide-card small { font-size: 9px; }
}

@media (min-width: 1024px) {
  /* Let the left content continue independently of the taller information rail. */
  .sm-home {
    display: grid;
    grid-template-columns: minmax(0, 2.08fr) minmax(0, .92fr);
    column-gap: 28px;
    align-items: start;
  }
  .sm-home-focus { grid-column: 1 / -1; }
  .sm-home-columns { display: contents; }
  .sm-latest { grid-column: 1; grid-row: 2; min-width: 0; }
  .sm-home-rail { grid-column: 2; grid-row: 2 / span 2; gap: 18px; min-width: 0; }
  .sm-game-hubs { grid-column: 1; grid-row: 3; gap: 48px; margin-top: 42px; }

  .sm-latest-card {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 20px;
    padding: 18px 0;
  }
  .sm-latest-card__thumb { height: 124px; border-radius: 9px; }
  .sm-latest-card__meta > span { padding: 4px 10px; font-size: 11.5px; }
  .sm-latest-card__meta time { font-size: 10.5px; }
  .sm-latest-card h3 { margin: 7px 0 6px; font-size: 18px; line-height: 1.45; }
  .sm-latest-card p { font-size: 13.5px; line-height: 1.6; }

  .sm-about-card { min-height: 220px; padding: 22px 24px; }
  .sm-about-card__eyebrow { font-size: 10.5px; }
  .sm-about-card h2 { margin-bottom: 12px; font-size: 24px; }
  .sm-about-card li { margin: 4px 0; font-size: 12.5px; }
  .sm-about-card li > span { width: 16px; height: 16px; font-size: 9px; }
  .sm-about-card__brand { margin-top: 12px; font-size: 20px; }
  .sm-rail-card { padding: 20px; }
  .sm-rail-card__heading { margin-bottom: 15px; }
  .sm-rail-card__heading h2 { font-size: 22px; }
  .sm-rail-card__heading p { font-size: 13px; }
  .sm-popular li {
    grid-template-columns: 30px 100px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 0;
  }
  .sm-popular__rank { width: 30px; height: 30px; font-size: 13px; }
  .sm-popular li > img { width: 100px; height: 64px; border-radius: 7px; }
  .sm-popular li > div > span { font-size: 10.5px; }
  .sm-popular li a { font-size: 14px; line-height: 1.45; -webkit-line-clamp: 3; }
  .sm-popular li time { margin-top: 3px; font-size: 10px; }

  .sm-game-directory__list { gap: 10px; }
  .sm-game-directory__list > a {
    grid-template-columns: 110px minmax(0, 1fr) 14px;
    gap: 12px;
    border-radius: 9px;
  }
  .sm-game-directory__list > a > img { width: 110px; height: 70px; }
  .sm-game-directory__list strong { font-size: 14px; line-height: 1.35; }
  .sm-game-directory__list small { margin-top: 3px; font-size: 11.5px; }

  .sm-game-hub { padding-left: 18px; border-left-width: 8px; }
  .sm-game-hub .sm-section-heading { margin-bottom: 22px; }
  .sm-game-hub .sm-section-heading h2 { font-size: 27px; }
  .sm-game-hub .sm-section-heading > div > p:last-child { font-size: 14px; }
  .sm-game-hub .sm-section-heading > a { font-size: 14px; }
  .sm-guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .sm-guide-card { min-height: 160px; border-radius: 11px; }
  .sm-guide-card > img { height: 84px; }
  .sm-guide-card__icon {
    top: 62px;
    left: 14px;
    width: 42px;
    height: 42px;
    border-width: 4px;
    font-size: 16px;
  }
  .sm-guide-card > span:last-child { padding: 17px 14px 16px 68px; }
  .sm-guide-card strong { font-size: 16px; line-height: 1.35; }
  .sm-guide-card small { margin-top: 5px; font-size: 12px; line-height: 1.45; }
}

@media (prefers-reduced-motion: reduce) {
  .sm-focus-card__cta,
  .sm-latest-card__thumb img,
  .sm-guide-card { transition: none; }
}
