/* NSROM Pro v2 — catalog layout
   Deep navy chrome + mint accent. No abstract hero art. */

:root {
  --navy: #07111f;
  --navy-2: #0d1b2d;
  --navy-3: #15283f;
  --mint: #14b8a6;
  --mint-deep: #0f766e;
  --mint-soft: #ccfbf1;
  --ink: #0f172a;
  --soft: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --warn: #d97706;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(7, 17, 31, 0.08);
  --font: "Figtree", system-ui, sans-serif;
  --display: "Sora", system-ui, sans-serif;
  --shell: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint-deep); text-decoration: none; }
a:hover { color: var(--mint); }
h1,h2,h3,h4 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 .55em;
}
.shell {
  width: min(100% - 1.5rem, var(--shell));
  margin-inline: auto;
}
.screen-reader-text, .skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 99; background: #000; color: #fff; padding: 8px 12px; }

/* Top bar removed */

/* Header */
.site-header {
  background: var(--navy-2);
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: .95rem 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #fff !important;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}
.logo__text .brand-mark { color: var(--mint); }
.custom-logo-link img { max-height: 40px; width: auto; }

.mast-search {
  display: flex;
  align-items: stretch;
  background: rgba(255,255,255,.06);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  max-width: 560px;
  width: 100%;
  margin-inline: auto;
  position: relative;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.mast-search:focus-within {
  background: #fff;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .22);
}
.mast-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  z-index: 1;
}
.mast-search:focus-within .mast-search__icon { color: var(--mint-deep); }
.mast-search input {
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  padding: .72rem 1rem .72rem 2.55rem;
  background: transparent;
  min-width: 0;
  color: #fff;
}
.mast-search:focus-within input { color: var(--ink); }
.mast-search input::placeholder { color: #94a3b8; }
.mast-search button {
  border: 0;
  background: var(--mint);
  color: #042f2e;
  font: inherit;
  font-weight: 800;
  padding: 0 1.2rem;
  cursor: pointer;
  white-space: nowrap;
}
.mast-search button:hover { background: #2dd4bf; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 11px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: #fff; }

.site-nav {
  background: var(--navy-3);
  border-top: 1px solid rgba(255,255,255,.05);
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .05rem;
}
.nav-list a {
  display: block;
  color: #cbd5e1;
  font-weight: 600;
  font-size: .9rem;
  padding: .7rem .85rem;
}
.nav-list a:hover,
.nav-list .current-menu-item > a {
  color: #fff;
  background: rgba(20, 184, 166, .12);
}

/* Home hero — text + search only */
.home-hero {
  background:
    radial-gradient(900px 280px at 15% 0%, rgba(20,184,166,.22), transparent 55%),
    radial-gradient(700px 240px at 90% 20%, rgba(14,116,144,.18), transparent 50%),
    linear-gradient(180deg, var(--navy-2), #10233a 70%, var(--bg));
  color: #fff;
  padding: 2.25rem 0 2.5rem;
}
.home-hero__inner {
  max-width: 760px;
  text-align: center;
}
.home-hero h1 {
  color: #fff;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  margin-bottom: .7rem;
}
.home-hero p {
  margin: 0 auto 1.15rem;
  color: #b6c4d4;
  font-size: 1.05rem;
  max-width: 38rem;
}
.hero-tags {
  margin-top: .25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45rem;
  align-items: center;
  color: #94a3b8;
  font-size: .88rem;
}
.hero-tags a {
  color: #e2e8f0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: .28rem .7rem;
  font-weight: 600;
}
.hero-tags a:hover { background: rgba(20,184,166,.2); color: #fff; }
.hero-tags__all {
  background: var(--mint) !important;
  border-color: var(--mint) !important;
  color: #042f2e !important;
  font-weight: 800 !important;
}

/* Featured rail */
.featured-rail { padding: 1.75rem 0 0.5rem; }
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.block-head h2 { margin: 0; font-size: 1.35rem; }
.block-head a { font-weight: 700; font-size: .92rem; white-space: nowrap; }

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 150px);
  gap: .85rem;
  overflow-x: auto;
  padding-bottom: .75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }

.rail-card {
  scroll-snap-align: start;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.rail-card__art {
  aspect-ratio: 3/4;
  border-radius: 10px;
  overflow: hidden;
  background: #cbd5e1;
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.rail-card:hover .rail-card__art { transform: translateY(-3px); }
.rail-card__art img { width: 100%; height: 100%; object-fit: cover; }
.rail-card__name {
  font-weight: 700;
  font-size: .84rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink);
  line-height: 1.25;
}
.rail-card__meta { font-size: .75rem; color: var(--muted); }

.art-fallback {
  width: 100%;
  height: 100%;
  min-height: 120px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--mint-deep);
  background: linear-gradient(160deg, #fff, var(--mint-soft));
}

/* Home layout */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  padding: 1.5rem 0 2.5rem;
  align-items: start;
}
.home-side { display: grid; gap: 1rem; position: sticky; top: 110px; }
.side-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}
.side-panel h3 { font-size: 0.95rem; margin-bottom: .75rem; }
.side-panel--note p { margin: 0; color: var(--soft); font-size: .9rem; }
.genre-list { list-style: none; margin: 0; padding: 0; }
.genre-list li + li { border-top: 1px solid var(--line); }
.genre-list a {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .55rem 0;
  color: var(--ink);
  font-weight: 600;
  font-size: .9rem;
}
.genre-list em { font-style: normal; color: var(--muted); font-weight: 500; }
.genre-list a:hover { color: var(--mint-deep); }

/* ROM grid */
.rom-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .9rem;
}
.rom-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.rom-card:hover {
  border-color: #99f6e4;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.rom-card__link { color: inherit; display: block; }
.rom-card__cover {
  position: relative;
  aspect-ratio: 3/4;
  background: #e2e8f0;
  overflow: hidden;
}
.rom-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rom-card__badge {
  position: absolute;
  left: 8px;
  top: 8px;
  background: rgba(7,17,31,.92);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  padding: .22rem .42rem;
  border-radius: 5px;
}
.rom-card__body { padding: .7rem .75rem .85rem; }
.rom-card__title {
  font-size: .88rem;
  margin: 0 0 .3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.25em;
}
.rom-card__meta {
  display: flex;
  gap: .5rem;
  color: var(--muted);
  font-size: .75rem;
}

.seo-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 2.5rem;
}
.seo-block p { margin: 0 0 0.85rem; color: var(--soft); }
.seo-block h3 { font-size: 1.05rem; margin: 1.1rem 0 0.45rem; }
.seo-block ul { margin: 0 0 0.85rem; padding-left: 1.2rem; color: var(--soft); }
.seo-block li { margin-bottom: 0.3rem; }
.seo-block__body > *:last-child { margin-bottom: 0; }
.footer-custom ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer-custom a { color: #cbd5e1; font-size: .9rem; }
.footer-about__text p { margin: .75rem 0 0; font-size: .9rem; max-width: 28rem; color: #94a3b8; }

.star-rating--interactive { gap: 4px; }
.star-rating--interactive button.star {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: #cbd5e1;
  cursor: pointer;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.star-rating--interactive button.star.is-on,
.star-rating--interactive button.star.is-half,
.star-rating--interactive button.star:hover {
  background: var(--warn);
}
.star-rating--interactive.is-locked button.star { cursor: default; opacity: 0.95; }

.rate-box { display: inline-flex; flex-wrap: wrap; gap: .45rem; align-items: center; color: var(--muted); font-size: .88rem; }

/* Archive / single shared */
.archive-wrap, .container { width: min(100% - 1.5rem, var(--shell)); margin: 1.25rem auto 2.5rem; }
.archive-hero, .page-content, .error-404, .rom-content, .rom-shots, .related-roms {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.archive-hero h1 { margin-bottom: .35rem; }
.archive-hero p, .archive-desc { margin: 0; color: var(--soft); }
.archive-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}

.breadcrumbs { margin: 0 0 1rem; }
.breadcrumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .3rem;
  font-size: .85rem; color: var(--muted);
}
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .3rem; color: #cbd5e1; }
.breadcrumbs a { color: var(--soft); }

/* Single ROM */
.rom-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.rom-hero__cover-col {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.rom-hero__cover {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: #e2e8f0;
}
.rom-hero__cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-downloads {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.cover-downloads .btn-download {
  width: 100%;
  text-align: center;
  border-radius: 10px;
  padding: .75rem .9rem;
  font-size: .9rem;
}
.cover-downloads .btn-download:nth-child(2) {
  background: var(--mint-deep);
}
.cover-downloads .btn-download:nth-child(2):hover {
  background: #0b5f59;
}
.format-badge {
  display: inline-block;
  background: var(--mint-soft);
  color: var(--mint-deep);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .04em;
  padding: .28rem .5rem;
  border-radius: 6px;
  margin-bottom: .5rem;
}
.rom-hero__title { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.rom-hero__sub { color: var(--muted); margin: 0 0 .9rem; }
.rom-hero__meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; align-items: center; }
.meta-pill {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .22rem .65rem;
  font-size: .8rem;
  color: var(--soft);
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .65rem;
  margin: 0 0 1rem;
}
.spec-grid div {
  background: var(--bg);
  border-radius: 10px;
  padding: .6rem .75rem;
}
.spec-grid dt {
  margin: 0 0 .1rem;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.spec-grid dd { margin: 0; font-weight: 700; word-break: break-word; }

.download-box {
  background: linear-gradient(135deg, #ecfeff, #f0fdfa);
  border: 1px solid #99f6e4;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: .85rem;
}
.download-box h2 { font-size: 1rem; margin-bottom: .65rem; }
.download-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn, .btn-download, .btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: 10px;
  padding: .72rem 1.05rem;
  border: 0;
  cursor: pointer;
}
.btn-download, .btn-primary {
  background: var(--navy);
  color: #fff !important;
}
.btn-download:hover, .btn-primary:hover { background: var(--mint-deep); }
.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink) !important;
}

.rate-buttons { display: flex; gap: .3rem; }
.rate-buttons button {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 700;
}
.rate-buttons button:hover, .rate-buttons button.is-active {
  background: var(--mint); border-color: var(--mint); color: #042f2e;
}

.star-rating { display: inline-flex; align-items: center; gap: 2px; }
.star {
  width: 13px; height: 13px; display: inline-block; background: #cbd5e1;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.star.is-on, .star.is-half { background: var(--warn); }
.star-meta { margin-left: .35rem; font-size: .82rem; color: var(--muted); }

.shot-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 280px);
  gap: .75rem;
  overflow-x: auto;
  padding-bottom: .55rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shot-slider::-webkit-scrollbar { height: 6px; }
.shot-slider::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
.shot-item {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 0;
  margin: 0;
  background: #0f172a;
  cursor: zoom-in;
  display: block;
  width: 100%;
  scroll-snap-align: start;
}
.shot-item img { width: 100%; height: 150px; object-fit: cover; transition: transform .25s ease, opacity .2s ease; }
.shot-item:hover img { transform: scale(1.04); opacity: .92; }

/* Comments */
.comments-area {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.4rem 1.6rem;
  margin: 1.5rem 0 2rem;
}
.comments-head { margin-bottom: 1.15rem; }
.comments-title {
  margin: 0;
  font-size: 1.2rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}
.comment-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.comment-list .children {
  list-style: none;
  margin: .85rem 0 0 1.1rem;
  padding: 0 0 0 .9rem;
  border-left: 2px solid var(--line);
}
.comment-item { margin: 0 0 1rem; }
.comment-body {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: .85rem;
  align-items: start;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.comment-avatar img,
.comment-avatar .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  align-items: baseline;
  margin-bottom: .4rem;
}
.comment-author {
  font-weight: 800;
  font-family: var(--display);
  font-size: .95rem;
  color: var(--ink);
}
.comment-author a { color: var(--ink); }
.comment-time {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
}
.comment-text {
  color: var(--soft);
  font-size: .95rem;
  line-height: 1.55;
}
.comment-text p { margin: 0 0 .55rem; }
.comment-text p:last-child { margin-bottom: 0; }
.comment-awaiting {
  margin: 0 0 .5rem;
  font-size: .82rem;
  color: var(--warn);
  font-weight: 600;
}
.comment-reply { margin-top: .55rem; }
.comment-reply a {
  display: inline-flex;
  font-size: .8rem;
  font-weight: 700;
  color: var(--mint-deep);
  background: var(--mint-soft);
  padding: .28rem .65rem;
  border-radius: 999px;
}
.comment-reply a:hover { background: var(--mint); color: #042f2e; }
.comment-navigation,
.comments-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  font-size: .88rem;
}

.nsrom-comment-respond {
  margin-top: .25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.comment-reply-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}
.comment-reply-title small {
  display: inline-block;
  margin-left: .5rem;
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 600;
}
.nsrom-comment-form p { margin: 0 0 .85rem; }
.nsrom-comment-form label {
  display: block;
  font-weight: 700;
  font-size: .82rem;
  margin-bottom: .35rem;
  color: var(--ink);
}
.nsrom-comment-form .req { color: #dc2626; }
.nsrom-comment-form input[type="text"],
.nsrom-comment-form input[type="email"],
.nsrom-comment-form input[type="url"],
.nsrom-comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .72rem .85rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.nsrom-comment-form input:focus,
.nsrom-comment-form textarea:focus {
  outline: 0;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .18);
}
.nsrom-comment-form textarea { min-height: 120px; resize: vertical; }
.nsrom-comment-form .comment-form-author,
.nsrom-comment-form .comment-form-email,
.nsrom-comment-form .comment-form-url {
  display: inline-block;
  width: calc(33.333% - .55rem);
  vertical-align: top;
  margin-right: .7rem;
}
.nsrom-comment-form .comment-form-url { margin-right: 0; }
.nsrom-comment-form .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .85rem;
  color: var(--soft);
}
.nsrom-comment-form .comment-form-cookies-consent label {
  display: inline;
  font-weight: 500;
  margin: 0;
}
.nsrom-comment-form .comment-form-cookies-consent input {
  width: auto;
  margin-top: .2rem;
}
.nsrom-comment-form .form-submit { margin: 1rem 0 0; }
.nsrom-comment-form .form-submit .btn-primary,
.nsrom-comment-form #submit {
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 800;
  padding: .75rem 1.25rem;
  cursor: pointer;
}
.nsrom-comment-form .form-submit .btn-primary:hover,
.nsrom-comment-form #submit:hover { background: var(--mint-deep); }
.comments-closed { margin: 0; color: var(--muted); }

@media (max-width: 700px) {
  .nsrom-comment-form .comment-form-author,
  .nsrom-comment-form .comment-form-email,
  .nsrom-comment-form .comment-form-url {
    display: block;
    width: 100%;
    margin-right: 0;
  }
  .comment-list .children { margin-left: .35rem; padding-left: .55rem; }
  .comment-body { grid-template-columns: 36px 1fr; gap: .65rem; padding: .85rem; }
  .comment-avatar img, .comment-avatar .avatar { width: 36px; height: 36px; }
}

/* Lightbox */
body.lightbox-open { overflow: hidden; }
.nsrom-lightbox[hidden] { display: none !important; }
.nsrom-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
}
.nsrom-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 31, 0.88);
  backdrop-filter: blur(4px);
}
.nsrom-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1100px);
  max-height: 90vh;
  display: grid;
  place-items: center;
}
.nsrom-lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  background: #000;
}
.nsrom-lightbox__close,
.nsrom-lightbox__nav {
  position: absolute;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  display: grid;
  place-items: center;
  transition: background .15s ease;
}
.nsrom-lightbox__close:hover,
.nsrom-lightbox__nav:hover { background: rgba(20, 184, 166, .85); color: #042f2e; }
.nsrom-lightbox__close {
  top: -2.5rem;
  right: 0;
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  line-height: 1;
}
.nsrom-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  font-size: 1.35rem;
}
.nsrom-lightbox__prev { left: -0.25rem; }
.nsrom-lightbox__next { right: -0.25rem; }
.nsrom-lightbox__counter {
  margin-top: .85rem;
  color: #cbd5e1;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
}
@media (max-width: 700px) {
  .nsrom-lightbox__prev { left: .25rem; }
  .nsrom-lightbox__next { right: .25rem; }
  .nsrom-lightbox__close { top: .5rem; right: .5rem; }
  .nsrom-lightbox__nav { width: 40px; height: 40px; background: rgba(0,0,0,.45); }
}

/* Sidebar widgets */
.sidebar .widget, .widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.widget-title { font-size: .95rem; }
.widget-rom-list { list-style: none; margin: 0; padding: 0; }
.widget-rom-list li { margin-bottom: .55rem; }
.widget-rom-list a {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: .55rem;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
  font-size: .84rem;
}
.widget-rom-list img { width: 44px; height: 58px; object-fit: cover; border-radius: 6px; }

.pagination { margin-top: 1.25rem; }
.pagination .page-numbers { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.pagination a, .pagination span {
  display: inline-flex; min-width: 36px; height: 36px; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; padding: 0 .5rem;
}
.pagination .current { background: var(--navy); border-color: var(--navy); color: #fff; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.empty-state p { margin: 0; color: var(--muted); }

.search-form { display: flex; gap: .45rem; margin: 1rem 0; }
.search-form input[type="search"] {
  flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .85rem; font: inherit;
}
.search-form input[type="submit"] {
  border: 0; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 700; padding: 0 1rem; cursor: pointer;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: #94a3b8;
  padding: 2.75rem 0 1.25rem;
  margin-top: 1rem;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: var(--mint); }
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 1.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-about p { margin: .75rem 0 0; font-size: .9rem; max-width: 28rem; }
.logo--footer { margin-bottom: .25rem; }
.site-footer h4 {
  color: #fff;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .75rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer-links a { font-size: .9rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  font-size: .84rem;
}
.footer-bottom p { margin: 0; }

/* Responsive */
@media (max-width: 1100px) {
  .rom-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .home-layout, .archive-layout { grid-template-columns: 1fr; }
  .home-side { position: static; grid-template-columns: 1fr 1fr; }
  .rom-hero { grid-template-columns: 180px 1fr; }
  .cover-downloads .btn-download { font-size: .82rem; padding: .65rem .7rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .site-header__row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo toggle"
      "search search";
  }
  .logo { grid-area: logo; }
  .nav-toggle {
    display: inline-flex;
    grid-area: toggle;
    justify-self: end;
  }
  .mast-search {
    display: flex;
    grid-area: search;
    max-width: none;
    margin: 0;
  }
  .site-nav { display: none; }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; padding: .35rem 0 .75rem; }
}
@media (max-width: 640px) {
  .rom-grid { grid-template-columns: repeat(2, 1fr); }
  .home-side { grid-template-columns: 1fr; }
  .rom-hero { grid-template-columns: 1fr; }
  .rom-hero__cover { max-width: 220px; }
  .rom-hero__cover-col { max-width: 260px; }
  .spec-grid, .footer-top { grid-template-columns: 1fr; }
  .shot-slider { grid-auto-columns: minmax(180px, 72%); }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Telegram group join box */
.tg-join {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: linear-gradient(135deg, #e8f6fd, #f0fbff);
  border: 1px solid #a5dcf4;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.tg-join__icon { flex: none; }
.tg-join__text { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.tg-join__text strong { font-family: var(--display); font-size: 1.05rem; color: var(--ink); }
.tg-join__text span { color: var(--soft); font-size: .9rem; }
.tg-join__btn {
  flex: none;
  background: #229ED9;
  color: #fff !important;
  font-weight: 800;
  border-radius: 10px;
  padding: .72rem 1.2rem;
}
.tg-join__btn:hover { background: #1a86ba; }
@media (max-width: 640px) {
  .tg-join { flex-wrap: wrap; }
  .tg-join__text { flex-basis: calc(100% - 56px); }
  .tg-join__btn { width: 100%; text-align: center; }
}
