/* game_tgn_0038 — SPLIT-FLAP TERMINAL (written from scratch) */

:root {
  --g38-board: #0a0a0b;
  --g38-panel: #121314;
  --g38-flap: #e8e4d9;
  --g38-led: #f0a202;
  --g38-metal: #3d5a5b;
  --g38-ink: #121212;
  --g38-fg: #e8e4d9;
  --g38-muted: #9aa0a6;
  --g38-line: rgba(61, 90, 91, 0.75);
  --g38-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --g38-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --g38-led-h: 48px;
  --g38-route-h: 52px;
  --g38-mob-h: 56px;
  --g38-star-full: #f0a202;
  --g38-star-empty: #6b7278;
  --bg-main: var(--g38-board);
  --text-main: var(--g38-fg);
  --text-muted: var(--g38-muted);
  --accent: var(--g38-led);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body.g38-body {
  margin: 0;
  font-family: var(--g38-sans);
  background: var(--g38-board);
  color: var(--g38-fg);
  line-height: 1.45;
  padding-bottom: calc(var(--g38-mob-h) + 12px);
}
@media (min-width: 768px) {
  body.g38-body { padding-bottom: 0; }
}

a { color: inherit; }
img { max-width: 100%; height: auto; }
.g38-mono { font-family: var(--g38-mono); letter-spacing: 0.06em; }
.g38-page-wrap {
  width: min(1120px, calc(100% - 28px));
  margin-inline: auto;
}
.g38-img-ph { background: #1a1b1d; display: block; object-fit: cover; }
.g38-ad-slot { margin: 12px auto; }
.g38-pick-section { background: transparent; }

/* LED strip */
.g38-led {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--g38-led-h);
  background: #070708;
  border-bottom: 1px solid var(--g38-line);
  box-shadow: inset 0 1px 0 rgba(232, 228, 217, 0.06);
}
.g38-led-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--g38-led-h);
}
.g38-led-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-width: 0;
  color: var(--g38-fg);
}
.g38-led-brand:hover { color: var(--g38-fg); }
.g38-led-brand .logo-img {
  height: 28px;
  width: auto;
  max-width: 56px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: left center;
}
.g38-led-live {
  background: var(--g38-led);
  color: var(--g38-ink);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 5px;
  flex-shrink: 0;
}
.g38-led-name {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.g38-led-search {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 6px;
}
@media (min-width: 768px) {
  .g38-led-search { display: inline-flex; }
}
.g38-search-input {
  background: var(--g38-panel);
  border: 1px solid var(--g38-line);
  color: var(--g38-fg);
  border-radius: 2px;
  padding: 6px 10px;
  font: inherit;
  min-width: 0;
}
.g38-led-go,
.g38-btn {
  border: 0;
  border-radius: 2px;
  font: inherit;
  cursor: pointer;
}
.g38-led-go,
.g38-btn-primary {
  background: var(--g38-led);
  color: var(--g38-ink);
  font-weight: 700;
  padding: 6px 12px;
}
.g38-btn-outline {
  background: transparent;
  border: 1px solid var(--g38-line);
  color: var(--g38-fg);
  padding: 6px 12px;
}
.g38-led-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
@media (min-width: 768px) {
  .g38-led-auth { margin-left: 0; }
}
.g38-led-signin {
  color: var(--g38-led);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Route flaps */
.g38-routes {
  background: var(--g38-panel);
  border-bottom: 1px solid var(--g38-line);
}
.g38-routes-inner {
  display: none;
  align-items: stretch;
  gap: 4px;
  min-height: var(--g38-route-h);
  padding: 6px 0;
  overflow: hidden;
}
@media (min-width: 768px) {
  .g38-routes-inner { display: flex; }
}
.g38-route-flap {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 6px 10px;
  min-width: 72px;
  text-decoration: none;
  background: var(--g38-flap);
  color: var(--g38-ink);
  border-radius: 2px;
  border: 1px solid transparent;
}
.g38-route-flap:hover,
.g38-route-flap.active {
  outline: 2px solid var(--g38-led);
  outline-offset: 0;
}
.g38-route-code {
  font-size: 0.62rem;
  color: var(--g38-metal);
}
.g38-route-label {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.g38-nav .nav-item--primary.is-overflow-hidden { display: none !important; }
.g38-nav .nav-more { position: relative; flex-shrink: 0; }
.g38-nav .nav-more-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: var(--g38-panel);
  border: 1px solid var(--g38-line);
  padding: 6px;
  z-index: 60;
}
.g38-nav .nav-more.active .nav-more-menu { display: grid; gap: 4px; }

/* Mobile bar */
.g38-mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  display: flex;
  background: #070708;
  border-top: 1px solid var(--g38-line);
  height: var(--g38-mob-h);
}
@media (min-width: 768px) {
  .g38-mobile-bar { display: none; }
}
.g38-mobile-bar .mobile-nav-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--g38-muted);
  font-size: 0.75rem;
  font-weight: 600;
}
.g38-mobile-bar .mobile-nav-item.active,
.g38-mobile-bar .mobile-nav-item:hover { color: var(--g38-led); }

/* Solari board */
.g38-main { padding: 14px 0 40px; }
.g38-solari {
  background: var(--g38-panel);
  border: 1px solid var(--g38-line);
  border-radius: 2px;
  overflow: hidden;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    rgba(232, 228, 217, 0.035) 31px,
    rgba(232, 228, 217, 0.035) 32px
  );
}
.g38-solari-head {
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(232, 228, 217, 0.1);
}
.g38-solari-meta { display: flex; gap: 8px; margin-bottom: 10px; }
.g38-flap-chip {
  background: var(--g38-flap);
  color: var(--g38-ink);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px 8px;
}
.g38-flap-chip--led {
  background: transparent;
  color: var(--g38-led);
  border: 1px solid var(--g38-led);
}
.g38-solari-kicker {
  margin: 0 0 4px;
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--g38-muted);
}
.g38-solari-brand {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.g38-solari-slogan {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  color: var(--g38-flap);
}
.g38-solari-desc {
  margin: 0 0 14px;
  color: var(--g38-muted);
  max-width: 46rem;
  font-size: 0.95rem;
}
.g38-solari-search {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin-bottom: 14px;
}
.g38-solari-search .g38-search-input { flex: 1; padding: 10px 12px; }
.g38-station-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.g38-station-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(10, 10, 11, 0.55);
  border: 1px solid var(--g38-line);
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.85rem;
}
.g38-station-code:hover { border-color: var(--g38-led); color: var(--g38-led); }
.g38-station-codes--foot { margin-top: 4px; }

/* Captions */
.g38-board-caption,
.g38-module .g38-board-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin: 0 0 10px;
  padding: 14px 0 0;
}
.g38-board-block .g38-board-caption { padding: 14px 18px 0; }
.g38-board-caption h2 {
  margin: 0;
  font-size: 1.15rem;
  flex: 1;
  min-width: 0;
}
.g38-board-caption .g38-mono { color: var(--g38-led); font-size: 0.7rem; }
.module-link-more {
  color: var(--g38-led);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}
.g38-module-desc { color: var(--g38-muted); margin: 0 0 10px; font-size: 0.9rem; }
.g38-board-block .g38-module-desc { padding: 0 18px; }

/* Flap rows — core signature */
.g38-flap-stack { border-top: 1px solid rgba(232, 228, 217, 0.08); }
.g38-flap-row {
  display: grid;
  grid-template-columns: 56px 96px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--g38-fg);
  border-bottom: 1px solid rgba(232, 228, 217, 0.08);
  background: rgba(10, 10, 11, 0.35);
  transition: background 0.15s ease;
}
.g38-flap-row:hover { background: rgba(240, 162, 2, 0.08); }
.g38-flap-row--next {
  grid-template-columns: 64px 140px minmax(0, 1fr) auto;
  padding: 12px;
  background: rgba(232, 228, 217, 0.06);
  border-left: 3px solid var(--g38-led);
}
.g38-flap-time {
  font-size: 0.72rem;
  color: var(--g38-led);
  font-weight: 700;
}
.g38-flap-thumb {
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background: #1a1b1d;
  aspect-ratio: 4 / 3;
}
.g38-flap-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.g38-flap-row:hover .g38-flap-thumb img { transform: scale(1.03); }
.g38-flap-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 0 !important;
}
.g38-flap-go {
  color: var(--g38-ink);
  background: var(--g38-flap);
  padding: 6px 8px;
  font-size: 0.68rem;
  font-weight: 800;
}
@media (max-width: 640px) {
  .g38-flap-row,
  .g38-flap-row--next {
    grid-template-columns: 44px 72px minmax(0, 1fr);
  }
  .g38-flap-go { display: none; }
}

.g38-dual-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--g38-line);
  border-radius: 2px;
  overflow: hidden;
}
@media (min-width: 900px) {
  .g38-dual-board {
    grid-template-columns: 1fr 1fr;
  }
  .g38-dual-board .g38-flap-row:nth-child(odd) {
    border-right: 1px solid rgba(232, 228, 217, 0.08);
  }
}

/* Ticket stubs */
.g38-gate-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}
.g38-gate-shelf {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}
.g38-stub {
  flex: 0 0 140px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--g38-ink);
  background: var(--g38-flap);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--g38-line);
}
.g38-stub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 900px) {
  .g38-stub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.g38-stub-grid .g38-stub {
  flex: none;
  width: 100%;
  min-width: 0;
}
.g38-stub-grid .g38-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.g38-stub-grid .brief-comment-game {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 0.75rem;
  color: var(--g38-muted, #9a9588);
  margin: 4px 0 0;
}
.g38-stub-spine {
  background: var(--g38-board);
  color: var(--g38-led);
  text-align: center;
  padding: 3px 4px;
  font-size: 0.68rem;
}
.g38-stub-art {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ddd8cc;
}
.g38-stub-art img { width: 100%; height: 100%; object-fit: cover; }
.g38-stub-body { padding: 6px 8px 10px !important; }
.g38-stub .game-title { color: var(--g38-ink); }
.g38-gate-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--g38-line);
  background: var(--g38-panel);
  color: var(--g38-fg);
  border-radius: 2px;
  cursor: pointer;
  font-size: 1.2rem;
}
.g38-gate-btn:disabled { opacity: 0.35; cursor: default; }

/* Manifest table */
.g38-manifest {
  border: 1px solid var(--g38-line);
  border-radius: 2px;
  overflow: hidden;
}
.g38-manifest-head,
.g38-manifest-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 72px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
}
.g38-manifest-head {
  background: rgba(232, 228, 217, 0.08);
  color: var(--g38-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}
.g38-manifest-head > span:first-child,
.g38-manifest-row > .g38-mono:first-child {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0;
  color: var(--g38-led);
  min-width: 0;
}
.g38-manifest-row {
  text-decoration: none;
  color: var(--g38-fg);
  border-top: 1px solid rgba(232, 228, 217, 0.08);
  background: rgba(10, 10, 11, 0.25);
}
.g38-manifest-row:hover { background: rgba(240, 162, 2, 0.08); }
.g38-manifest-flight {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.g38-manifest-flight img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}
.g38-manifest-flight .special-card-content {
  padding: 0 !important;
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.g38-manifest .g38-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  overflow: visible;
  min-width: 0;
}
.g38-manifest .g38-tag-chip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.g38-manifest .game-star {
  justify-content: flex-end;
  flex-wrap: nowrap;
  font-size: 0.72rem;
  gap: 1px;
  min-width: 0;
}
.g38-manifest .brief-comment-game {
  font-size: 0.78rem;
}
@media (min-width: 768px) {
  .g38-manifest-head,
  .g38-manifest-row {
    grid-template-columns: 32px minmax(0, 1fr) 88px;
    gap: 12px;
    padding: 10px 14px;
  }
  .g38-manifest-flight img {
    width: 96px;
    height: 72px;
  }
  .g38-manifest .game-star {
    font-size: 0.82rem;
    gap: 2px;
  }
}

.g38-module { padding: 8px 0 20px; }
.g38-stations { padding: 8px 0 28px; }

/* Titles / stars / clamp */
.article-list .game-title,
.article-list .card-title,
.special-card .game-title,
.carousel-card .game-title {
  display: block;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}
.article-list .special-card-content,
.article-list .carousel-card-content {
  padding: 12px 14px 16px;
}
.special-card-content,
.card-content { min-width: 0; }

.game-star {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 1;
  font-size: 0.82rem;
}
.game-star .star-full::before { content: "★"; color: var(--g38-star-full); }
.game-star .star-half::before { content: "☆"; color: var(--g38-star-full); }
.game-star .star-empty::before { content: "☆"; color: var(--g38-star-empty); }
.game-star--detail-hero { font-size: 1.05rem; margin: 6px 0 10px; }

.g38-main .brief-comment-game,
.g38-tags-page .brief-comment-game,
.article-list .brief-comment-game {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  min-width: 0;
  margin: 0;
  color: var(--g38-muted);
  font-size: 0.82rem;
  line-height: 1.4;
  word-break: break-word;
}
.g38-main .g38-flap-main .brief-comment-game {
  -webkit-line-clamp: 1;
  line-clamp: 1;
}
@media (min-width: 768px) {
  .g38-main .g38-flap-main .brief-comment-game {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}
.g38-main .g38-card-tags,
.g38-tags-page .g38-card-tags,
.article-list .g38-card-tags {
  display: flex;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
  overflow: visible;
}
.g38-main .g38-flap-main .g38-card-tags {
  flex-wrap: nowrap;
  overflow: hidden;
}
@media (min-width: 768px) {
  .g38-main .g38-flap-main .g38-card-tags {
    flex-wrap: wrap;
    overflow: visible;
  }
}
/* Manifest rows: always wrap tags so chips are not clipped */
.g38-main .g38-manifest .g38-card-tags {
  flex-wrap: wrap;
  overflow: visible;
  gap: 4px;
}
.g38-tag-chip {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--g38-line);
  border-radius: 2px;
  font-size: 0.7rem;
  color: var(--g38-muted);
  white-space: nowrap;
}

/* Detail boarding pass */
.g38-detail-crumb { padding: 14px 0 8px; }
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--g38-muted);
  font-size: 0.85rem;
}
.breadcrumb-list a { color: var(--g38-led); text-decoration: none; }
.g38-pass {
  background: var(--g38-flap);
  color: var(--g38-ink);
  border-radius: 2px;
  border: 1px solid var(--g38-line);
  padding: 18px;
  margin-bottom: 18px;
}
.g38-pass-kicker {
  margin: 0 0 12px;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--g38-metal);
}
.g38-pass-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
@media (min-width: 800px) {
  .g38-pass-grid {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
  }
}
.g38-pass-art {
  overflow: hidden;
  border-radius: 2px;
  background: #d9d4c8;
  width: 100%;
  max-width: 320px;
}
.g38-pass-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
@media (min-width: 800px) {
  .g38-pass-art {
    max-width: none;
  }
  .g38-pass-art img {
    aspect-ratio: 1 / 1;
  }
}
.g38-pass-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.g38-pass-body h1 {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}
.g38-pass-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.g38-pass-field {
  background: rgba(10, 10, 11, 0.06);
  padding: 8px 10px;
  border-radius: 2px;
}
.g38-pass-field .g38-mono {
  display: block;
  font-size: 0.62rem;
  color: var(--g38-metal);
  margin-bottom: 2px;
}
.g38-pass-hint { color: #3d454d; font-size: 0.88rem; margin: 0; }
.detail-play-cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 14px 0 8px;
}
.g38-pass .hero-play-btn,
.g38-pass .button-play,
.g38-pass .play-btn {
  position: static;
  left: auto;
  bottom: auto;
}
.g38-detail-prose {
  background: var(--g38-panel);
  border: 1px solid var(--g38-line);
  border-radius: 2px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.g38-detail-prose h2 { margin: 0 0 8px; font-size: 1.1rem; }
.g38-detail-block { margin-bottom: 18px; }
.g38-detail-quote { color: var(--g38-muted); }
.g38-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.g38-detail-tags .g38-tag-chip { color: var(--g38-ink); border-color: rgba(18, 18, 18, 0.2); }

.description-text-wrap.is-collapsed {
  max-height: 180px;
  overflow: hidden;
  position: relative;
}
.description-toggle-btn {
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--g38-line);
  color: var(--g38-led);
  padding: 6px 10px;
  border-radius: 2px;
  cursor: pointer;
}

/* Tags — no left rail */
.g38-tags-page { padding-bottom: 28px; }
.g38-tags-masthead {
  padding: 16px 0 10px;
  border-bottom: 1px solid var(--g38-line);
}
.g38-tags-eyebrow {
  margin: 0 0 4px;
  font-family: var(--g38-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--g38-led);
}
.g38-tags-masthead h1 { margin: 0 0 4px; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.tag-h2 {
  margin: 0;
  font-size: 0.92rem;
  color: var(--g38-muted);
  font-weight: 500;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.g38-tags-masthead-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-end;
}
.g38-tags-masthead-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.g38-tags-search { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; }
.g38-tags-search .g38-search-input { flex: 1 1 auto; min-width: 0; }
.g38-tags-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.g38-tags-cat-rail {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.g38-tags-cat-chip {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  background: var(--g38-flap);
  color: var(--g38-ink);
  text-decoration: none;
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.g38-view-toggle { display: inline-flex; gap: 4px; flex-shrink: 0; }
.g38-view-btn {
  background: var(--g38-panel);
  border: 1px solid var(--g38-line);
  color: var(--g38-muted);
  padding: 6px 10px;
  border-radius: 2px;
  cursor: pointer;
}
.g38-view-btn.is-active { color: var(--g38-ink); background: var(--g38-led); border-color: var(--g38-led); }

.g38-tags-layout {
  display: block;
  padding-top: 16px;
}
.g38-sidebar { display: none !important; } /* intentional: no desktop left rail */

.g38-game-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--g38-line);
  border-radius: 2px;
  overflow: hidden;
  background: var(--g38-panel);
}
.g38-game-grid.g38-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 0;
  overflow: visible;
  background: transparent;
}
@media (min-width: 900px) {
  .g38-game-grid.g38-view-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}

/* Board / list view */
.g38-tags-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  text-decoration: none;
  color: var(--g38-fg);
  border-bottom: 1px solid rgba(232, 228, 217, 0.08);
  background: var(--g38-panel);
  min-width: 0;
}
.g38-tags-card:last-child { border-bottom: 0; }
.g38-tags-card:hover { background: rgba(240, 162, 2, 0.08); }
.g38-view-lines .g38-card-thumb {
  width: 96px;
  flex-shrink: 0;
  border-radius: 2px;
  overflow: hidden;
  background: #1a1b1d;
}
.g38-view-lines .g38-card-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.g38-view-lines .g38-card-info,
.g38-view-lines .special-card-content {
  padding: 0 !important;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.g38-view-lines .card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.g38-view-lines .g38-card-tags {
  flex-wrap: wrap;
  overflow: visible;
  gap: 4px;
}
.g38-view-lines .brief-comment-game {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

@media (min-width: 640px) {
  .g38-view-lines .g38-tags-card {
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 14px;
  }
  .g38-view-lines .g38-card-thumb { width: 128px; }
}

/* Grid view */
.g38-view-grid .g38-tags-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--g38-line);
  border-radius: 2px;
  border-bottom: 1px solid var(--g38-line);
  padding: 0;
  overflow: hidden;
  background: var(--g38-panel);
}
.g38-view-grid .g38-tags-card:hover {
  border-color: var(--g38-led);
  background: var(--g38-panel);
}
.g38-view-grid .g38-card-thumb {
  width: 100%;
  overflow: hidden;
  background: #1a1b1d;
}
.g38-view-grid .g38-card-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.g38-view-grid .g38-card-info,
.g38-view-grid .special-card-content {
  padding: 10px 12px 12px !important;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.g38-view-grid .card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.g38-view-grid .brief-comment-game {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.g38-card-thumb { overflow: hidden; background: #1a1b1d; }
.g38-card-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.g38-card-info { min-width: 0; }
.g38-view-lines .g38-tags-card-idx { display: none; }
.g38-empty-inline { padding: 28px; text-align: center; grid-column: 1 / -1; }

.g38-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 11, 0.72);
  z-index: 70;
  border: 0;
  cursor: pointer;
}
.g38-tags-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 92vw);
  z-index: 80;
  transform: translateX(105%);
  transition: transform 0.2s ease;
  pointer-events: none;
}
body.g38-drawer-open .g38-tags-drawer {
  transform: translateX(0);
  pointer-events: none;
}
body.g38-drawer-open .g38-drawer-panel { pointer-events: auto; }
.g38-drawer-panel {
  height: 100%;
  background: var(--g38-panel);
  border-left: 1px solid var(--g38-line);
  padding: 16px;
  overflow: auto;
}
.g38-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.g38-drawer-head h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--g38-fg);
}
.g38-drawer-close {
  background: transparent;
  border: 1px solid var(--g38-line);
  color: var(--g38-fg);
  width: 36px;
  height: 36px;
  border-radius: 2px;
  cursor: pointer;
}
.g38-drawer-link {
  display: block;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(232, 228, 217, 0.08);
  text-decoration: none;
  color: var(--g38-fg);
}
.g38-drawer-link:hover { color: var(--g38-led); }

/* Footer */
.g38-footer {
  border-top: 1px solid var(--g38-line);
  padding: 28px 0 40px;
  margin-top: 12px;
}
.g38-footer-rule {
  height: 1px;
  background: var(--g38-line);
  margin-bottom: 18px;
}
.g38-footer-grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 768px) {
  .g38-footer-grid { grid-template-columns: 1.2fr 1fr auto; }
}
.g38-footer-logo { font-weight: 800; font-size: 1.1rem; }
.g38-footer-kicker {
  margin: 4px 0;
  font-family: var(--g38-mono);
  font-size: 0.7rem;
  color: var(--g38-led);
}
.g38-footer-tagline { color: var(--g38-muted); font-size: 0.9rem; }
.g38-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.g38-footer-links a { text-decoration: none; color: var(--g38-fg); font-size: 0.88rem; }
.g38-footer-links a:hover { color: var(--g38-led); }
.g38-footer-social { display: flex; gap: 10px; }
.g38-social-icon { color: var(--g38-muted); text-decoration: none; font-size: 0.85rem; }
.g38-footer-copy { margin: 18px 0 0; color: var(--g38-muted); font-size: 0.8rem; }

/* Override ads.css purple/cyan pill — LED flap control */
.back-to-top.g38-back-top,
.g38-back-top {
  position: fixed;
  right: 16px;
  bottom: calc(var(--g38-mob-h) + 16px);
  z-index: 900;
  width: 46px;
  height: 46px;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid var(--g38-line);
  border-radius: 2px;
  background: var(--g38-panel);
  color: var(--g38-led);
  box-shadow: inset 0 1px 0 rgba(232, 228, 217, 0.06);
  backdrop-filter: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  font-size: 0;
}
.back-to-top.g38-back-top::before,
.g38-back-top::before {
  content: none;
  display: none;
  animation: none;
}
.back-to-top.g38-back-top.show,
.g38-back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  display: inline-flex;
}
.back-to-top.g38-back-top:not(.show),
.g38-back-top:not(.show) {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}
.back-to-top.g38-back-top:hover,
.g38-back-top:hover {
  border-color: var(--g38-led);
  background: #1a1b1d;
  color: var(--g38-led);
  box-shadow: none;
  transform: translateY(-2px);
}
.back-to-top.g38-back-top:active,
.g38-back-top:active {
  transform: translateY(0);
}
.g38-back-top__mark {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.g38-back-top__label {
  font-family: var(--g38-mono);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  color: inherit;
}
@media (min-width: 768px) {
  .back-to-top.g38-back-top,
  .g38-back-top { bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top.g38-back-top,
  .g38-back-top {
    transition: opacity 0.15s ease, visibility 0.15s ease;
  }
}

.g38-related { padding: 8px 0 28px; }
.game-empty { padding: 40px 0; text-align: center; }
.game-empty-title { font-size: 1.4rem; margin-bottom: 8px; }

/* Detail + related — mobile compact */
@media (max-width: 767px) {
  .g38-body--detail .g38-page-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }
  .g38-pass {
    padding: 12px;
    margin-bottom: 12px;
  }
  .g38-pass-kicker { margin-bottom: 8px; }
  .g38-pass-grid { gap: 12px; }
  .g38-pass-art {
    max-width: 100%;
  }
  .g38-pass-art img {
    aspect-ratio: 16 / 10;
  }
  .g38-pass-body h1 {
    font-size: 1.25rem;
    margin-bottom: 4px;
  }
  .g38-pass-fields {
    gap: 6px;
    margin: 8px 0;
  }
  .g38-pass-field { padding: 6px 8px; }
  .detail-play-cta,
  .g38-pass .detail-play-cta,
  .g38-pass .action-buttons {
    margin: 10px 0 4px;
    gap: 8px;
  }
  .g38-pass-hint {
    font-size: 0.8rem;
  }
  .g38-detail-prose {
    padding: 12px 14px;
    margin-bottom: 14px;
  }
  .g38-detail-block { margin-bottom: 12px; }
  .g38-detail-crumb { margin-bottom: 8px; }
  .g38-related { padding: 4px 0 20px; }
  .g38-stub { flex-basis: 128px; }
}

/* Legal / auth shells */
.g38-legal {
  background: var(--g38-flap);
  color: var(--g38-ink);
  padding: 20px;
  border-radius: 2px;
  margin: 18px 0 36px;
}
.g38-legal a { color: #8a5a00; }
.g38-auth-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  padding: 24px 12px 48px;
}
.g38-auth-card {
  width: min(420px, 100%);
  background: var(--g38-flap);
  color: var(--g38-ink);
  border-radius: 2px;
  padding: 22px;
  border: 1px solid var(--g38-line);
}
.g38-auth-kicker {
  margin: 0 0 6px;
  font-family: var(--g38-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--g38-metal);
  text-transform: uppercase;
}
.g38-auth-head {
  margin: 0 0 14px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--g38-ink);
}
.g38-filter-btn { display: inline-flex; }
@media (min-width: 900px) {
  .g38-filter-btn { display: none; }
}

@media (max-width: 767px) {
  .g38-nav-user-row .g38-nav-user-name { display: none; }
}