﻿/* indie-shelf components ??itch homepage shell */

/* Top ad ? main column only (does not enter sidebar rail) */
.shelf-top-ad {
  position: relative;
  margin-left: var(--content-left);
  margin-right: var(--page-pad);
  width: calc(100% - var(--content-left) - var(--page-pad));
  box-sizing: border-box;
  background: var(--surface);
  z-index: 20;
}
.shelf-top-ad__inner {
  display: block;
  line-height: 0;
}
.shelf-top-ad__inner img {
  width: 100%;
  max-height: 80px;
  object-fit: cover;
}
.shelf-top-ad__close {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  border: 1px solid var(--border);
  background: #fff;
  width: 1.5rem;
  height: 1.5rem;
  cursor: pointer;
}

/* ???Header (itch top bar) ???*/
.shelf-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--surface);
  min-height: var(--header-h);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
}
.shelf-header__inner {
  position: relative;
  width: 100%;
  padding-inline: var(--page-pad);
  box-sizing: border-box;
  margin: 0;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.shelf-logo {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--brand);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}
.shelf-logo:hover { color: var(--brand-hover); text-decoration: none; }
.shelf-logo img { width: 22px; height: 22px; object-fit: contain; }
.shelf-logo__text { color: inherit; }

.shelf-primary-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.shelf-primary-nav a {
  color: #434343;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}
.shelf-primary-nav a:hover,
.shelf-primary-nav a[aria-current="page"] {
  color: var(--brand);
  text-decoration: none;
}

.shelf-search {
  display: flex;
  flex: 1;
  min-width: 10rem;
  max-width: 42rem;
  margin-left: 0.25rem;
}
.shelf-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid #c5c5c5;
  border-right: 0;
  border-radius: 2px 0 0 2px;
  padding: 0.38rem 0.6rem;
  background: #f4f4f4;
  color: var(--text);
  font-size: 0.84rem;
}
.shelf-search input::placeholder { color: #999; }
.shelf-search__btn {
  border: 1px solid #c5c5c5;
  border-radius: 0 2px 2px 0;
  background: #ececec;
  padding: 0 0.65rem;
  cursor: pointer;
  color: #666;
  display: inline-flex;
  align-items: center;
}
.shelf-search__btn:hover { color: var(--brand); background: #e4e4e4; }

.shelf-header__auth {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  flex-shrink: 0;
}
.shelf-header__auth:not(:has(a)) {
  display: none;
}
.shelf-header__auth > .shelf-auth-btn:nth-child(n + 3) {
  display: none;
}
.shelf-header__auth > .shelf-auth-btn:only-child,
.shelf-header__auth > .shelf-auth-btn:nth-child(2) {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.shelf-header__auth > .shelf-auth-btn:only-child:hover,
.shelf-header__auth > .shelf-auth-btn:nth-child(2):hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
}
.shelf-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.7rem;
  border: 1px solid #c8c8c8;
  border-radius: 2px;
  background: #fff;
  color: #444;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.shelf-auth-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}
.shelf-auth-btn--primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.shelf-auth-btn--primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
}

/* Narrow-only: external links as text between header and top-ad */
.shelf-ext-links {
  display: none;
}

.shelf-menu-btn {
  display: none;
  margin-left: auto;
  border: 1px solid #ccc;
  background: #fff;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Body: dashboard shell — fixed sidebar, scrolling main column */
.shelf-body {
  background: var(--surface);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
}
.shelf-body__inner {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  display: block;
  padding: 1.25rem var(--page-pad) 3rem;
  padding-left: var(--content-left);
  background: var(--surface);
}

.shelf-main {
  min-width: 0;
  background: var(--surface);
}

/* Sidebar: fixed dashboard rail, full viewport height */
.shelf-sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  z-index: 30;
  width: calc(var(--page-pad) + var(--sidebar-w));
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  padding: 1.25rem 0.75rem 1.5rem var(--page-pad);
  font-size: 0.84rem;
  color: #444;
  background: var(--rail);
  scrollbar-gutter: stable;
}
.shelf-sidebar::-webkit-scrollbar {
  width: 8px;
}
.shelf-sidebar::-webkit-scrollbar-thumb {
  background: #cfcfcf;
  border-radius: 4px;
}
.shelf-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.shelf-sidebar__head,
.shelf-sidebar__search {
  display: none;
}

.shelf-drawer-backdrop {
  display: none;
}
.shelf-side-block {
  margin-bottom: 1.35rem;
}
.shelf-side-block__title {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #222;
}
.shelf-side-tags,
.shelf-side-list,
.shelf-side-blog {
  list-style: none;
  margin: 0;
  padding: 0;
}
.shelf-side-tags {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0.65rem;
  row-gap: 0.12rem;
}
.shelf-side-list--cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0.65rem;
  row-gap: 0.12rem;
}
.shelf-side-tags a,
.shelf-side-list a,
.shelf-side-blog a {
  color: #444;
  line-height: 1.55;
  font-size: 0.84rem;
}
.shelf-side-tags a:hover,
.shelf-side-list a:hover,
.shelf-side-blog a:hover,
.shelf-side-list a[aria-current="page"] {
  color: var(--brand);
  text-decoration: none;
}
.shelf-side-more-wrap {
  margin: 0.45rem 0 0;
}
.shelf-side-more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
}
.shelf-side-empty {
  margin: 0;
  font-size: 0.84rem;
}
.shelf-side-blog li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  padding: 0.38rem 0;
  border-bottom: 1px solid #ececec;
  align-items: start;
}
.shelf-side-blog a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shelf-side-blog time {
  color: #999;
  font-size: 0.72rem;
  white-space: nowrap;
  padding-top: 0.1rem;
}
.shelf-side-social {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.15rem 0 0.25rem;
}
.shelf-side-social__icons {
  display: flex;
  gap: 0.45rem;
}
.shelf-soc {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 2px;
  background: #e8e8e8;
  color: #555;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.shelf-soc:hover {
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}
.shelf-side-app {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--brand);
}

/* ???Intro / promo ???*/
.shelf-intro {
  background: #efefef;
  border: 1px solid #e0e0e0;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.65rem;
  color: #555;
  font-size: 0.9rem;
  text-align: center;
}
.shelf-intro p { margin: 0; }
.shelf-intro strong { color: #222; font-weight: 700; }
.shelf-intro a { font-weight: 700; }
.shelf-intro--global {
  margin: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}
.shelf-intro--global strong + p {
  margin-top: 0.25rem;
}

.shelf-hero .shelf-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}
.shelf-hero .shelf-subline {
  margin: 0.35rem 0 0;
  font-weight: 600;
  color: #333;
}

.shelf-seo {
  margin-top: 1.25rem;
}
.shelf-seo__block + .shelf-seo__block {
  margin-top: 1rem;
}
.shelf-seo__bridge {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 720px) {
  .shelf-seo__bridge {
    grid-template-columns: 1fr 1fr;
  }
}

.shelf-promo-bar {
  display: block;
  background: #434b56;
  color: #dce3ec;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}
.shelf-promo-bar p {
  margin: 0;
}
.shelf-promo-bar strong {
  color: #fff;
  font-weight: 700;
}

/* ???Featured hero (dark) ???*/
.shelf-featured {
  position: relative;
  background: var(--featured-bg);
  color: var(--featured-text);
  margin-bottom: 1.75rem;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.shelf-featured__track {
  display: flex;
  transition: transform 0.35s ease;
  will-change: transform;
  cursor: grab;
}
.shelf-featured__track:active {
  cursor: grabbing;
}
.shelf-featured__slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  min-height: 280px;
}
.shelf-featured__media {
  position: relative;
  background: #1a1a1a;
  min-height: 280px;
}
.shelf-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}
.shelf-ad-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0.15rem 0.4rem;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}
.shelf-featured__media--app {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #333, #1a1a1a);
  text-decoration: none;
}
.shelf-featured__media--app img {
  width: 42%;
  height: auto;
  max-height: 180px;
  min-height: 0;
  object-fit: contain;
}
.shelf-featured__title a {
  color: #fff;
  text-decoration: none;
}
.shelf-featured__title a:hover {
  color: var(--brand);
}
.shelf-featured__info {
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.shelf-featured__eyebrow {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
}
.shelf-featured__title {
  margin: 0;
  color: #fff;
  font-size: 1.35rem;
}
.shelf-featured__quote {
  margin: 0;
  color: #cfcfcf;
  font-style: italic;
  font-size: 0.92rem;
}
.shelf-featured__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.5rem;
}
.shelf-featured__dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0 0.7rem;
  background: var(--featured-bg);
}
.shelf-featured__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  border: 0;
  background: #666;
  cursor: pointer;
  padding: 0;
}
.shelf-featured__dot.is-active { background: var(--brand); }

/* ???Section heads ???*/
.shelf-section { margin-bottom: 1.75rem; }
.shelf-section__head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.shelf-section__head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.shelf-section__more {
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid #d0d0d0;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  color: #444;
  background: #f7f7f7;
}
.shelf-section__more:hover {
  color: var(--brand);
  border-color: var(--brand);
  text-decoration: none;
}

/* ???Game grid (itch cards) ???*/
.shelf-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 1.1rem 0.85rem;
}

.shelf-game {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
a.shelf-game:hover {
  color: inherit;
  text-decoration: none;
}
a.shelf-game:hover .shelf-game__title { color: var(--brand); }

.shelf-game__cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #e8e8e8;
  overflow: hidden;
  margin-bottom: 0.45rem;
}
.shelf-game__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shelf-game__badge {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.shelf-game__title {
  margin: 0 0 0.15rem;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shelf-game__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--faint);
  margin-bottom: 0.15rem;
}
.shelf-game__tags {
  margin-bottom: 0.15rem;
  min-height: 1em;
}
.shelf-game__desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ???Tabs / filters ???*/
.shelf-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.shelf-tabs__btn {
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
}
.shelf-tabs__btn.is-active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}
.shelf-tabs__panel[hidden] { display: none; }

.shelf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem;
  background: #f7f7f7;
  border: 1px solid var(--border);
}
.shelf-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
}
.shelf-filters select,
.shelf-filters input {
  min-width: 8.5rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  font-weight: 400;
  text-transform: none;
  font-size: 0.85rem;
}
.shelf-filters__count {
  margin-left: auto;
  align-self: end;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: none;
  font-weight: 400;
}

/* ???Detail ???*/
.shelf-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: 1.25rem;
  align-items: start;
}
.shelf-detail__hero {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  background: #f7f7f7;
  border: 1px solid var(--border);
  padding: 1rem;
  margin-bottom: 1.25rem;
}
.shelf-detail__icon {
  aspect-ratio: 1;
  background: #e4e4e4;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.shelf-detail__icon img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}
.shelf-detail__side {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  border: 1px solid var(--border);
  background: #fafafa;
  padding: 1rem;
}
.shelf-detail__side .shelf-btn { width: 100%; margin-bottom: 0.75rem; }
.shelf-detail__specs {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
}
.shelf-detail__specs li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.shelf-detail__specs strong { color: var(--text); }
.shelf-detail__body {
  border: 1px solid var(--border);
  padding: 1.25rem;
  background: #fff;
}

/* ???Blog list ???*/
.shelf-blog-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.shelf-blog-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.85rem;
  border: 1px solid var(--border);
  padding: 0.75rem;
  color: inherit;
  text-decoration: none;
  background: #fff;
}
a.shelf-blog-row:hover {
  border-color: var(--border-strong);
  text-decoration: none;
  color: inherit;
}
.shelf-blog-row__thumb {
  aspect-ratio: 1;
  background: #e8e8e8;
  overflow: hidden;
}
.shelf-blog-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shelf-blog-row__meta {
  font-size: 0.75rem;
  color: var(--faint);
  margin-bottom: 0.2rem;
}
.shelf-blog-row__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}
.shelf-blog-row__desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.shelf-badge {
  display: inline-block;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.75rem;
}

/* ???FAQ ???*/
.shelf-faq details {
  border: 1px solid var(--border);
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.4rem;
  background: #fafafa;
}
.shelf-faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.shelf-faq summary::-webkit-details-marker { display: none; }
.shelf-faq details[open] summary {
  color: var(--brand);
  margin-bottom: 0.4rem;
}
.shelf-faq details p {
  margin: 0;
  color: var(--muted);
}

/* Footer — same rail gray as sidebar; no border divider */
.shelf-footer {
  background: var(--rail);
  padding: 2rem var(--page-pad) 1.75rem;
  padding-left: var(--content-left);
  font-size: 0.84rem;
  color: #666;
  text-align: left;
  box-sizing: border-box;
}
.shelf-footer__inner {
  width: 100%;
  padding-inline: 0;
  box-sizing: border-box;
  margin: 0;
}
.shelf-footer__grid {
  display: grid;
  grid-template-columns: minmax(12rem, 1.4fr) repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  align-items: start;
}
.shelf-footer__brand {
  max-width: 22rem;
}
.shelf-footer__name {
  display: block;
  color: #222;
  font-size: 1rem;
  margin-bottom: 0.45rem;
}
.shelf-footer__brand p {
  margin: 0 0 0.55rem;
  color: #666;
  line-height: 1.5;
}
.shelf-footer__col h3 {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
}
.shelf-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.shelf-footer__col li {
  margin: 0 0 0.35rem;
}
.shelf-footer__col a {
  color: #333;
  font-weight: 600;
}
.shelf-footer__col a:hover {
  color: var(--brand);
  text-decoration: none;
}
.shelf-footer__blurb {
  max-width: 36rem;
  margin: 0 0 0.85rem;
  color: #777;
  font-size: 0.84rem;
}
.shelf-footer__disclaimer {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  color: #999;
}
.shelf-footer__disclaimer p {
  margin: 0 0 0.35rem;
}
.shelf-footer__friends {
  margin: 0 0 0.85rem;
}
.shelf-footer__friends h3 {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}
.shelf-footer__friends ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}
.shelf-footer__friends a {
  color: #555;
  font-size: 0.84rem;
}
.shelf-footer__friends a:hover {
  color: var(--brand);
  text-decoration: none;
}
.shelf-footer__responsible {
  margin: 0;
  font-size: 0.8rem;
  color: #777;
}
.shelf-footer__legal {
  padding-top: 0.85rem;
  border-top: 1px solid #e5e5e5;
  color: #888;
  font-size: 0.78rem;
}

@media (max-width: 720px) {
  .shelf-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .shelf-footer__brand {
    grid-column: 1 / -1;
    max-width: none;
  }
}
@media (max-width: 420px) {
  .shelf-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ???Modal / float / dock ???*/
.shelf-modal[hidden] { display: none !important; }
.shelf-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.shelf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
.shelf-modal__panel {
  position: relative;
  width: min(100%, 24rem);
  background: #fff;
  border: 1px solid var(--border);
  padding: 1.25rem;
}
.shelf-modal__close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--muted);
}
.shelf-modal__contacts {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.shelf-float {
  position: fixed;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.shelf-float a {
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}
.shelf-float img { width: 100%; height: 100%; object-fit: cover; }

.shelf-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 0.65rem 0;
}
.shelf-dock__inner {
  width: 100%;
  padding-left: var(--content-left);
  padding-right: var(--page-pad);
  box-sizing: border-box;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
body.has-download-dock-page { padding-bottom: 4rem; }

.shelf-notfound {
  text-align: center;
  padding: 3rem 1rem;
  border: 1px solid var(--border);
  background: #fafafa;
}
.shelf-notfound h1 { color: var(--brand); }

/* ???Responsive ???*/
@media (max-width: 1100px) {
  .shelf-game-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 960px) {
  .shelf-game-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}
@media (max-width: 900px) {
  .shelf-primary-nav,
  .shelf-search,
  .shelf-header__auth {
    display: none !important;
  }
  .shelf-menu-btn { display: inline-flex; }

  .shelf-ext-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 0.55rem var(--page-pad);
    background: var(--surface);
  }
  .shelf-ext-links:not(:has(a)) {
    display: none;
  }
  .shelf-ext-links > a:nth-child(n + 3) {
    display: none;
  }
  .shelf-ext-links a {
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }
  .shelf-ext-links a:hover {
    color: var(--brand-hover);
    text-decoration: underline;
  }

  .shelf-top-ad {
    margin-left: var(--page-pad);
    margin-right: var(--page-pad);
    width: calc(100% - var(--page-pad) * 2);
  }

  .shelf-body__inner {
    padding: 1.25rem var(--page-pad) 3rem;
  }

  .shelf-footer {
    padding-left: var(--page-pad);
    padding-right: var(--page-pad);
  }

  .shelf-dock__inner {
    padding-left: var(--page-pad);
    padding-right: var(--page-pad);
  }

  .shelf-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(0, 0, 0, 0.4);
  }
  .shelf-drawer-backdrop[hidden] {
    display: none !important;
  }

  .shelf-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 70;
    width: min(20rem, 88vw);
    height: 100vh;
    height: 100dvh;
    padding: 0;
    background: #fff;
    border-right: 1px solid #ddd;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: auto;
  }
  body.is-drawer-open .shelf-sidebar {
    transform: translateX(0);
  }

  .shelf-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.75rem 1rem;
    background: #fff;
    border-bottom: 1px solid #eee;
  }
  .shelf-sidebar__close {
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0 0.2rem;
  }
  .shelf-sidebar__search {
    display: flex;
    gap: 0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
  }
  .shelf-sidebar__search input {
    flex: 1;
    min-width: 0;
    border: 1px solid #c5c5c5;
    border-right: 0;
    border-radius: 2px 0 0 2px;
    padding: 0.4rem 0.55rem;
    background: #f4f4f4;
  }
  .shelf-sidebar__search button {
    border: 1px solid #c5c5c5;
    border-radius: 0 2px 2px 0;
    background: #ececec;
    padding: 0 0.65rem;
    cursor: pointer;
    font-weight: 700;
    color: #444;
  }

  .shelf-sidebar .shelf-side-block {
    padding: 0 1rem;
    margin-bottom: 1.15rem;
  }
  .shelf-sidebar .shelf-side-block:first-of-type {
    margin-top: 0.85rem;
  }
  .shelf-side-social {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding-inline: 1rem;
  }

  .shelf-game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shelf-featured__slide { grid-template-columns: 1fr; }
  .shelf-featured__media,
  .shelf-featured__media img { min-height: 180px; }
  .shelf-detail { grid-template-columns: 1fr; }
  .shelf-detail__side { position: static; }
}
@media (max-width: 640px) {
  .shelf-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root { --page-pad: 0.75rem; }
  .shelf-header__inner { gap: 0.5rem; }
  .shelf-detail__hero { grid-template-columns: 5rem 1fr; }
}
