/*
Theme Name: DayuGames
Theme URI: https://dayugames.example
Author: DayuGames
Author URI: https://dayugames.example
Description: 面向中文游戏资源站的通用 WordPress 主题。单包一体，支持游戏多版本资源管理、下载出口、评分与帮助中心。
Version: 1.8.25
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dayugames
Tags: game, download, custom-post-type
*/

/* =========================================================
   DayuGames — 基础样式 + 首页完整样式
   ========================================================= */

:root {
  --dg-bg:        #F2F4F5;
  --dg-surface:   #FFFFFF;
  --dg-ink:       #16181C;
  --dg-ink-2:     #626A74;
  --dg-ink-3:     #98A0AA;
  --dg-line:      #E7EAEC;
  --dg-accent:    #E4572E;
  --dg-accent-ink:#FFFFFF;
  --dg-free:      #1E9E63;
  --dg-vip:       #C45C1A;
  --dg-wrap:      1152px;
  --dg-gutter:    24px;
  --dg-r-card:    4px;
  --dg-r-sec:     6px;
  --dg-shadow:    0 1px 2px rgba(16,24,40,.04);
  /* Aliases DayuPay 0.7.x already reads (not a leftover --dp-* refactor). */
  --dg-border:        var(--dg-line);
  --dg-border-strong: rgba(228, 87, 46, 0.35);
  --dg-radius:        var(--dg-r-sec);
  --dg-btn-radius:    var(--dg-r-card);
  --dg-text:          var(--dg-ink);
  --dg-text-muted:    var(--dg-ink-2);
  --dg-accent-soft:   rgba(228, 87, 46, 0.10);
  --dg-accent-deep:   var(--dg-accent);
  --dg-accent-hover:  #c84722;
  --dg-color-primary: var(--dg-accent);
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--dg-bg);
  color: var(--dg-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.dg-wrap {
  max-width: var(--dg-wrap);
  margin: 0 auto;
  padding-left: var(--dg-gutter);
  padding-right: var(--dg-gutter);
}

/* ===== Header ===== */
.dg-header {
  height: 68px;
  background: var(--dg-surface);
  border-bottom: 1px solid var(--dg-line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.dg-header .dg-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dg-header__logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.dg-nav__list {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dg-nav__list a {
  font-size: 14px;
  color: var(--dg-ink-2);
}

.dg-nav__list a:hover { color: var(--dg-ink); }
.dg-nav__list .current-menu-item > a,
.dg-nav__list a[aria-current="page"] {
  color: var(--dg-ink);
  font-weight: 700;
}

.dg-main {
  padding: 24px 0 48px;
}
.dg-footer {
  padding: 32px 0;
  text-align: center;
  color: var(--dg-ink-3);
  font-size: 13px;
  border-top: 1px solid var(--dg-line);
  margin-top: 48px;
  background: var(--dg-surface);
}

/* ===== Sections ===== */
.dg-sec {
  background: var(--dg-surface);
  border: 1px solid var(--dg-line);
  border-radius: var(--dg-r-sec);
  padding: 15px;
  margin-bottom: 24px;
  box-shadow: var(--dg-shadow);
}

.dg-sec__title {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 3px solid #F26B21;
  line-height: 1.4;
}

.dg-sec__head {
  margin: 0 -15px 16px;
  padding: 0 15px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

/* ===== Grid & Cards ===== */
.dg-grid {
  display: grid;
  gap: 18px;
}

.dg-grid--4 { grid-template-columns: repeat(4, 1fr); }
.dg-grid--5 { grid-template-columns: repeat(5, 1fr); }

.dg-card {
  background: var(--dg-surface);
  border-radius: var(--dg-r-card);
  overflow: hidden;
  display: block;
  box-shadow: var(--dg-shadow);
  transition: box-shadow .16s;
}

.dg-card:hover {
  box-shadow: 0 4px 12px rgba(16,24,40,.08);
}

.dg-card__cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eee;
}

.dg-card__title {
  font-size: 13.5px;
  font-weight: 600;
  margin: 10px 12px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Chips ===== */
.dg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 -15px 16px;
  padding: 0 15px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.dg-chip {
  display: inline-block;
  height: auto;
  padding-bottom: 8px;
  border-radius: 0;
  background: transparent;
  color: #6B7280;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
}

.dg-chip:hover { color: var(--dg-ink); }

.dg-chip.is-active {
  background: transparent;
  color: var(--dg-ink);
  font-weight: 700;
  border-bottom-color: #F26B21;
}

/* ===== Buttons ===== */
.dg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 22px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}

.dg-btn--ghost {
  border-color: var(--dg-line);
  background: transparent;
  color: var(--dg-ink);
}

.dg-btn--ghost:hover {
  border-color: var(--dg-accent);
  color: var(--dg-accent);
}

.dg-home-more {
  text-align: center;
  margin-top: 28px;
}

/* ===== Homepage sidebar / 新鲜事儿 ===== */
.dg-widget {
  background: var(--dg-surface);
  border: 1px solid var(--dg-line);
  border-radius: var(--dg-r-sec);
  padding: 15px;
  margin: 0 0 24px;
  box-shadow: var(--dg-shadow);
}

.dg-widget__title {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--dg-accent);
  line-height: 1.4;
}

/* Fresh widget already renders a .dg-sec card — avoid a second frame. */
.dg-widget.widget_dg_fresh {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.dg-home-side .dg-fresh {
  margin-bottom: 0;
}

.dg-fresh__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dg-fresh__item {
  padding: 10px 0;
  border-bottom: 1px solid var(--dg-line);
}

.dg-fresh__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dg-fresh__item:first-child {
  padding-top: 0;
}

.dg-fresh__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.dg-fresh__link:hover {
  color: inherit;
}

.dg-fresh__link:hover .dg-fresh__excerpt,
.dg-fresh__link:hover .dg-fresh__author {
  color: var(--dg-accent);
}

.dg-fresh__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dg-fresh__avatar {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--dg-bg);
}

.dg-fresh__avatar-img,
.dg-fresh__avatar img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
}

.dg-fresh__author {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--dg-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dg-fresh__time {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--dg-ink-3);
  white-space: nowrap;
}

.dg-fresh__line2 {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
}

.dg-fresh__post {
  display: block;
  color: var(--dg-accent);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dg-fresh__excerpt {
  color: var(--dg-ink-2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.dg-fresh__empty {
  margin: 0;
  font-size: 13px;
  color: var(--dg-ink-3);
}

/* ===== Home layout ===== */
.dg-home-screen--1 .dg-home-screen__inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--dg-gutter);
  align-items: start;
}

.dg-home-screen--2 {
  padding-top: 8px;
}

/* ===== Single Game ===== */
.dg-crumb {
  font-size: 13px;
  color: var(--dg-ink-2);
  margin: 0 0 14px;
}
.dg-single-game .dg-crumb {
  margin: 12px 0 16px;
}
.dg-crumb a { color: var(--dg-ink-2); }
.dg-crumb a:hover { color: var(--dg-accent); }
.dg-crumb__sep { margin: 0 6px; }

.dg-titlebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.dg-titlebar__title {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
}
.dg-titlebar__meta {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dg-titlebar__count {
  font-size: 13px;
  color: var(--dg-ink-2);
}

.dg-vb {
  display: inline-block;
  height: 19px;
  line-height: 19px;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}
.dg-vb--free { background: var(--dg-free); color: #fff; }
.dg-vb--new  { background: var(--dg-accent); color: #fff; }

.dg-single-game .dg-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: stretch;
  background: var(--dg-surface);
  border: 1px solid var(--dg-line);
  border-radius: 10px;
  box-shadow: var(--dg-shadow);
  padding: 0;
  margin-bottom: 16px;
  overflow: hidden;
}
.dg-rate-hero {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
}
.dg-rate-hero__num {
  font-size: 32px;
  font-weight: 700;
  color: var(--dg-accent);
}
.dg-rate-hero__tx { font-size: 12px; color: var(--dg-ink-2); }
.dg-rate-hero__n  { font-size: 13px; color: var(--dg-ink-2); margin-left: 8px; }

.dg-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  margin: 0 0 16px;
}
.dg-sp {
  display: flex;
  font-size: 12.5px;
}
.dg-sp dt {
  width: 56px;
  color: var(--dg-ink-3);
  flex-shrink: 0;
}
.dg-sp dd { margin: 0; }

.dg-btn--primary {
  background: var(--dg-accent);
  color: #fff;
  height: 44px;
  padding: 0 28px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.dg-btn--primary:hover { opacity: .92; }

.dg-vlist { display: flex; flex-direction: column; }
.dg-vrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--dg-line);
}
.dg-vrow:last-child { border-bottom: 0; }
.dg-vrow__title { font-weight: 600; font-size: 14px; }
.dg-vrow__meta { font-size: 11.5px; color: var(--dg-ink-2); margin-top: 4px; }
.dg-vbtn {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--dg-line);
  border-radius: 4px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
}
.dg-vbtn:hover { border-color: var(--dg-accent); color: var(--dg-accent); }

.dg-rate-dist { margin-top: 12px; }
.dg-rate-dist__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}
.dg-rate-dist__label { width: 28px; color: var(--dg-ink-2); }
.dg-rate-dist__bar {
  flex: 1;
  height: 5px;
  background: #F2F4F5;
  border-radius: 3px;
  overflow: hidden;
}
.dg-rate-dist__bar span {
  display: block;
  height: 100%;
  background: var(--dg-accent);
}
.dg-rate-dist__num { width: 24px; text-align: right; color: var(--dg-ink-3); }

.dg-help-list { list-style: none; margin: 0; padding: 0; }
.dg-help-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--dg-line);
}
.dg-help-list li:last-child { border-bottom: 0; }
.dg-help-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
}
.dg-help-meta {
  font-size: 13px;
  color: var(--dg-ink-2);
  margin-bottom: 16px;
}
.dg-help-related {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--dg-line);
}
.dg-help-related h3 { font-size: 15px; margin: 0 0 8px; }
.dg-help-related ul { margin: 0; padding-left: 18px; }
.dg-fav-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--dg-line);
  background: transparent;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.dg-filter { margin-bottom: 20px; }
.dg-search-list { display: flex; flex-direction: column; gap: 16px; }
.dg-search-item {
  display: flex;
  gap: 16px;
  background: var(--dg-surface);
  border: 1px solid var(--dg-line);
  border-radius: var(--dg-r-sec);
  padding: 12px;
}
.dg-search-item__thumb { width: 152px; height: 86px; object-fit: cover; border-radius: 4px; }
.dg-search-item h2 { font-size: 16px; margin: 0 0 6px; }
.dg-search-item p { margin: 0; font-size: 13px; color: var(--dg-ink-2); }
.dg-empty { color: var(--dg-ink-3); font-size: 13px; }

@media (max-width: 1024px) {
  .dg-grid--5 { grid-template-columns: repeat(3, 1fr); }
  .dg-home-screen--1 .dg-home-screen__inner {
    grid-template-columns: 1fr;
  }
}

/* DayuPay official card inside the game-detail download section */
.dg-downloads .dg-vrow__pay { width: 100%; }
.dg-downloads .dayupay-download {
  margin: 0;
  border-radius: var(--dg-r-sec);
  box-shadow: var(--dg-shadow);
}
.dg-downloads .dayupay-download__top {
  background: var(--dg-accent-soft);
}
.dg-downloads .dayupay-download__meta,
.dg-downloads .dayupay-download__meta--price .dayupay-amount,
.dg-downloads .dayupay-download__meta--price .dayupay-currency {
  color: var(--dg-accent);
}
.dg-downloads .dayupay-download .button,
.dg-downloads .dayupay-pay-trigger,
.dg-downloads .dayupay-vip-trigger {
  border-radius: var(--dg-r-card);
  box-shadow: none;
}
.dg-downloads .dayupay-download .button,
.dg-downloads .dayupay-pay-trigger {
  background: var(--dg-accent);
  border-color: var(--dg-accent);
  color: var(--dg-accent-ink);
}
.dg-downloads .dayupay-download .button:hover,
.dg-downloads .dayupay-pay-trigger:hover {
  background: var(--dg-accent-hover);
  border-color: var(--dg-accent-hover);
  color: var(--dg-accent-ink);
}
.dg-downloads .dayupay-vip-trigger {
  background: transparent;
  color: var(--dg-accent);
  border: 1px solid var(--dg-border-strong);
}
.dg-downloads .dayupay-vip-trigger:hover {
  background: var(--dg-accent-soft);
  color: var(--dg-accent);
}

@media (max-width: 768px) {
  .dg-header { height: 56px; }
  .dg-grid--4,
  .dg-grid--5 { grid-template-columns: repeat(2, 1fr); }
  .dg-sec { padding: 16px; }
  .dg-home-screen--1 .dg-home-screen__inner { gap: 16px; }
  .dg-specs { grid-template-columns: 1fr; }
}

/* ===== 1.8.16 additions ===== */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.dg-header .dg-wrap { gap: 16px; }
.dg-header__search {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 6px;
}
.dg-header__search input[type="search"] {
  height: 34px;
  width: 180px;
  max-width: 32vw;
  padding: 0 10px;
  border: 1px solid var(--dg-line);
  border-radius: 4px;
  font-size: 13px;
  background: var(--dg-bg);
  color: var(--dg-ink);
}
.dg-header__search button {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: var(--dg-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.dg-vb--vip,
.dg-vb--paid { background: var(--dg-vip); color: #fff; }

.dg-vrow-fold { border-bottom: 1px solid var(--dg-line); }
.dg-vrow-fold:last-child { border-bottom: 0; }
.dg-vrow-fold > summary { list-style: none; cursor: pointer; }
.dg-vrow-fold > summary::-webkit-details-marker { display: none; }
.dg-vrow-fold > summary.dg-vrow { border-bottom: 0; }
.dg-vrow__detail { padding: 0 0 14px; }
.dg-vrow__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.dg-vmeta {
  display: inline-block;
  font-size: 12px;
  color: var(--dg-ink-2);
  margin-right: 8px;
}
.dg-vbtn.is-disabled {
  opacity: .5;
  pointer-events: none;
}
.dg-back-link { margin-top: 16px; }

.dg-reqs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dg-req h3 { font-size: 14px; margin: 0 0 8px; }

.dg-comments { margin-top: 0; }
.dg-comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.dg-comment-list .comment { padding: 12px 0; border-bottom: 1px solid var(--dg-line); }
.dg-rating-field { margin: 0 0 12px; }
.dg-rating-field select { margin-top: 4px; }

.dg-game-search-results {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  border: 1px solid #d0d5dd;
  background: #fff;
  max-height: 220px;
  overflow: auto;
}
.dg-game-search-results li button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.dg-game-search-results li button:hover { background: #f2f4f5; }

@media (max-width: 768px) {
  .dg-header .dg-wrap { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .dg-header__search { width: 100%; margin-left: 0; }
  .dg-header__search input[type="search"] { flex: 1; max-width: none; }
  .dg-reqs { grid-template-columns: 1fr; }
  .dg-nav__list { flex-wrap: wrap; gap: 12px; }
}

/* ===== 1.8.18 game-detail head / engage (scoped) ===== */
.dg-single-game .dg-hero__media {
  min-width: 0;
  padding: 0;
}
.dg-single-game .dg-hero__cover-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #2C2418, #7A5A2E);
  border-radius: 10px 0 0 10px;
}
.dg-single-game .dg-hero__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.dg-single-game .dg-hero__ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2C2418, #7A5A2E);
}
.dg-single-game .dg-hero__ribbon {
  position: absolute;
  top: 18px;
  right: -32px;
  z-index: 4;
  width: 130px;
  height: 26px;
  padding: 0;
  border-radius: 0;
  background: var(--dg-vip);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  transform: rotate(45deg);
  transform-origin: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.dg-single-game .dg-hero__ribbon--free {
  background: var(--dg-free);
}
.dg-single-game .dg-hero__thumbs-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  min-width: 0;
  padding: 28px 0 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.42) 55%, rgba(0, 0, 0, 0) 100%);
}
.dg-single-game .dg-hero__thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 44px 4px;
  scroll-padding-inline: 44px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.dg-single-game .dg-hero__thumbs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.dg-single-game .dg-hero__thumb {
  flex: 0 0 104px;
  width: 104px;
  aspect-ratio: 16 / 9;
  height: auto;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.dg-single-game .dg-hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dg-single-game .dg-hero__thumb.is-active,
.dg-single-game .dg-hero__thumb:hover {
  border-color: var(--dg-accent);
}
.dg-single-game .dg-hero__thumbs-nav {
  position: absolute;
  top: auto;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: calc(104px * 9 / 16);
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  background: #fff;
  color: #12141a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
.dg-single-game .dg-hero__thumbs-nav--prev { left: 6px; }
.dg-single-game .dg-hero__thumbs-nav--next { right: 6px; }
.dg-single-game .dg-hero__cover-frame:hover .dg-hero__thumbs-nav:not(.is-hidden),
.dg-single-game .dg-hero__cover-frame:focus-within .dg-hero__thumbs-nav:not(.is-hidden) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.dg-single-game .dg-hero__thumbs-nav.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.dg-single-game .dg-hero__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px 16px 16px 0;
  box-sizing: border-box;
}
.dg-single-game .dg-hero__tagline {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dg-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dg-single-game .dg-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--dg-ink-2);
  font-size: 14px;
}
.dg-single-game .dg-hero .dg-specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  background: transparent;
}
.dg-single-game .dg-hero .dg-sp {
  display: flex;
  gap: 8px;
  min-width: 0;
  margin: 0;
  font-size: 13px;
}
.dg-single-game .dg-hero .dg-sp dt {
  width: auto;
  flex: 0 0 4.5em;
  color: var(--dg-ink-2);
  font-weight: 600;
}
.dg-single-game .dg-hero .dg-sp dd {
  margin: 0;
  min-width: 0;
  word-break: break-word;
}
.dg-single-game .dg-hero__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
}
.dg-single-game .dg-tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  background: #2a2e38;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 26px;
}
.dg-single-game .dg-tag:hover {
  background: #1f232c;
  color: #fff;
}
.dg-single-game .dg-engage {
  display: grid;
  grid-template-columns: 1fr 88px;
  align-items: center;
  position: relative;
  min-height: 72px;
  margin: 0 0 16px;
  padding: 0;
  background: var(--dg-surface);
  border: 1px solid var(--dg-line);
  border-radius: 10px;
  box-shadow: var(--dg-shadow);
  overflow: hidden;
}
.dg-single-game .dg-engage__side {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 72px;
  padding: 14px 18px;
}
.dg-single-game .dg-engage__score {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--dg-accent);
}
.dg-single-game .dg-engage__score small {
  font-size: 13px;
  font-weight: 500;
  color: var(--dg-ink-2);
}
.dg-single-game .dg-engage__stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #f5b942;
  text-decoration: none;
  line-height: 1;
}
.dg-single-game .dg-engage__star {
  position: relative;
  display: inline-block;
  color: #d0d5dd;
  font-size: 20px;
  line-height: 1;
}
.dg-single-game .dg-engage__star.is-full { color: #f5b942; }
.dg-single-game .dg-engage__star.is-half { color: #d0d5dd; }
.dg-single-game .dg-engage__star.is-half::before {
  content: "★";
  position: absolute;
  left: 0;
  width: 50%;
  overflow: hidden;
  color: #f5b942;
}
.dg-single-game .dg-engage__fav {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 72px;
  padding: 0;
}
.dg-single-game .dg-engage__fav::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: var(--dg-line);
}
.dg-single-game .dg-engage__heart,
.dg-single-game .dg-engage .dg-fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--dg-ink-2);
  cursor: pointer;
}
.dg-single-game .dg-engage__heart:hover,
.dg-single-game .dg-engage__heart.is-active,
.dg-single-game .dg-engage .dg-fav-btn:hover,
.dg-single-game .dg-engage .dg-fav-btn.is-active {
  color: #e11d48;
}
.dg-single-game .dg-engage__heart.is-active svg,
.dg-single-game .dg-engage .dg-fav-btn.is-active svg {
  fill: currentColor;
}

@media (max-width: 1024px) {
  .dg-single-game .dg-titlebar__title { font-size: 22px; }
  .dg-single-game .dg-hero__thumb {
    flex-basis: 84px;
    width: 84px;
  }
  .dg-single-game .dg-hero__thumbs-nav {
    height: calc(84px * 9 / 16);
  }
}

@media (max-width: 860px) {
  .dg-single-game .dg-hero { grid-template-columns: 1fr; }
  .dg-single-game .dg-hero__cover-frame { border-radius: 10px 10px 0 0; }
  .dg-single-game .dg-hero__info { padding: 16px; }
  .dg-single-game .dg-engage { grid-template-columns: 1fr; }
  .dg-single-game .dg-engage__side { flex-wrap: wrap; }
  .dg-single-game .dg-engage__fav::before {
    top: 0;
    bottom: auto;
    left: 22px;
    right: 22px;
    width: auto;
    height: 1px;
  }
}


/* ===== 1.8.19 game comments (scoped to .dg-comments) ===== */
.dg-comments__empty {
  margin: 16px 0 0;
  color: var(--dg-ink-3);
  font-size: 14px;
  line-height: 1.6;
}

.dg-comment-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.dg-comment-list .dg-comment,
.dg-comment-list .comment {
  list-style: none;
  padding: 16px 0;
  border-bottom: 1px solid var(--dg-line);
}
.dg-comment-list .children {
  list-style: none;
  margin: 0;
  padding: 0 0 0 52px;
}
.dg-comment-list .children .dg-comment,
.dg-comment-list .children .comment {
  border-bottom: 0;
  border-top: 1px solid var(--dg-line);
}

.dg-comment__body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.dg-comment__avatar {
  flex: 0 0 40px;
}
.dg-comment__avatar img {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.dg-comment__main {
  flex: 1;
  min-width: 0;
}
.dg-comment__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
}
.dg-comment__name,
.dg-comment__name a {
  font-size: 14px;
  font-weight: 600;
  color: var(--dg-ink);
}
.dg-comment__name a:hover { color: var(--dg-accent); }
.dg-comment__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  color: var(--dg-ink-2);
  border: 1px solid var(--dg-line);
  border-radius: 4px;
  padding: 0 5px;
}
.dg-comment__rating {
  font-size: 12px;
  font-weight: 600;
  color: var(--dg-accent);
}
.dg-comment__time,
.dg-comment__time a {
  font-size: 12px;
  color: var(--dg-ink-2);
  font-weight: 400;
}
.dg-comment__time a:hover { color: var(--dg-accent); }
.dg-comment__content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--dg-ink);
}
.dg-comment__content p { margin: 0 0 8px; }
.dg-comment__content p:last-child { margin-bottom: 0; }
.dg-comment__awaiting {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--dg-ink-2);
}
.dg-comment__reply { margin-top: 8px; }
.dg-comment__reply a,
.dg-comment__reply .comment-reply-link {
  font-size: 13px;
  color: var(--dg-ink-2);
}
.dg-comment__reply a:hover,
.dg-comment__reply .comment-reply-link:hover {
  color: var(--dg-accent);
}

.dg-comments .comment-navigation,
.dg-comments .navigation.pagination {
  margin: 16px 0 0;
}
.dg-comments .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.dg-comments .nav-links a,
.dg-comments .nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--dg-line);
  border-radius: 4px;
  color: var(--dg-ink-2);
}
.dg-comments .nav-links a:hover {
  border-color: var(--dg-accent);
  color: var(--dg-accent);
}
.dg-comments .nav-links .current {
  border-color: var(--dg-accent);
  color: var(--dg-accent);
  font-weight: 600;
}

/* Form: do not reuse .dg-sec__title orange short-line on the reply heading. */
.dg-comments .comment-respond { margin-top: 20px; }
.dg-comments .comment-reply-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  line-height: 1.4;
}
.dg-comments .comment-reply-title small {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 400;
}
.dg-comments .comment-reply-title #cancel-comment-reply-link {
  color: var(--dg-ink-2);
}
.dg-comments .comment-reply-title #cancel-comment-reply-link:hover {
  color: var(--dg-accent);
}

.dg-comments .comment-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.dg-comments .comment-form p { margin: 0 0 12px; }
.dg-comments .comment-form-comment,
.dg-comments .dg-rating-field,
.dg-comments .comment-form-cookies-consent,
.dg-comments .form-submit,
.dg-comments .comment-notes,
.dg-comments .logged-in-as {
  grid-column: 1 / -1;
}
.dg-comments .comment-form label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--dg-ink-2);
}
.dg-comments .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.dg-comments .comment-form-cookies-consent label {
  display: inline;
  margin: 0;
  font-size: 13px;
  color: var(--dg-ink-2);
}
.dg-comments .comment-form textarea,
.dg-comments .comment-form input[type="text"],
.dg-comments .comment-form input[type="email"] {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--dg-line);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dg-ink);
  background: var(--dg-surface);
}
.dg-comments .comment-form textarea { resize: vertical; }
.dg-comments .comment-form input[type="text"]:focus,
.dg-comments .comment-form input[type="email"]:focus,
.dg-comments .comment-form textarea:focus {
  outline: none;
  border-color: var(--dg-accent);
  box-shadow: 0 0 0 2px var(--dg-accent-soft);
}
.dg-comments .form-submit { margin: 0; }
.dg-comments .form-submit .dg-btn--primary { border: 0; cursor: pointer; }

/* 1–10 radio row */
.dg-rating-field {
  margin: 0 0 12px;
  border: 0;
  padding: 0;
  min-width: 0;
}
.dg-rating-field legend {
  font-size: 13px;
  color: var(--dg-ink-2);
  margin: 0 0 6px;
  padding: 0;
}
.dg-rating-field__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.dg-rating-field__opt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid var(--dg-line);
  border-radius: 4px;
  font-size: 13px;
  color: var(--dg-ink);
  cursor: pointer;
  user-select: none;
  background: var(--dg-surface);
}
.dg-rating-field__opt:hover {
  border-color: var(--dg-accent);
}
.dg-rating-field__opt:has(input:checked) {
  border-color: var(--dg-accent);
  color: var(--dg-accent);
  background: var(--dg-accent-soft);
}
.dg-rating-field__opt:has(input:focus-visible) {
  box-shadow: 0 0 0 2px var(--dg-accent-soft);
}
.dg-rating-field__opt input {
  margin: 0;
}

/* When comment-reply.js moves #respond under a comment, hide rating (top-level only). */
.dg-comment-list #respond .dg-rating-field,
.dg-comment-list .comment #respond .dg-rating-field {
  display: none;
}

@media (max-width: 768px) {
  .dg-comment-list .children { padding-left: 20px; }
  .dg-comments .comment-form { grid-template-columns: 1fr; }
}

/* ===== Help archive (/help/) ===== */
.post-type-archive-help .dg-footer { margin-top: 32px; }

.dg-help-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 20px 40px;
  align-items: end;
  margin-bottom: 28px;
}
.dg-help-hero__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.25;
  color: var(--dg-ink);
}
.dg-help-hero__lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--dg-ink-2);
  max-width: 36em;
}

.dg-help-search {
  display: flex;
  align-items: center;
  height: 44px;
  min-width: 0;
  background: var(--dg-surface);
  border: 1px solid var(--dg-line);
  border-radius: var(--dg-r-card);
  box-shadow: var(--dg-shadow);
  overflow: hidden;
}
.dg-help-search__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  color: var(--dg-ink-3);
  flex: none;
}
.dg-help-search__icon svg { display: block; }
.dg-help-search input[type="search"] {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--dg-ink);
  outline: none;
  padding: 0 8px 0 0;
}
.dg-help-search input[type="search"]::placeholder { color: var(--dg-ink-3); }
.dg-help-search input[type="search"]::-webkit-search-decoration,
.dg-help-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.dg-help-search button {
  height: 100%;
  padding: 0 22px;
  border: 0;
  background: #E4572E;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex: none;
  white-space: nowrap;
}
.dg-help-search button:hover { background: var(--dg-accent-hover); }

.dg-help-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--dg-ink-2);
}
.dg-help-shortcuts__label { color: var(--dg-ink-3); }
.dg-help-shortcuts a:hover,
.dg-help-shortcuts a.is-active { color: var(--dg-accent); }

.dg-help-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.dg-help-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--dg-ink-3);
}
.dg-help-aside { padding-top: 30px; }

.dg-help-board {
  background: var(--dg-surface);
  border: 1px solid var(--dg-line);
  border-radius: var(--dg-r-sec);
  box-shadow: var(--dg-shadow);
}
.dg-help-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--dg-line);
}
.dg-help-row:last-child { border-bottom: 0; }
.dg-help-row:hover { background: #FAFBFC; }
.dg-help-row:hover .dg-help-row__title { color: var(--dg-accent); }
.dg-help-row__body { flex: 1; min-width: 0; }
.dg-help-row__title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 6px;
}
.dg-help-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  font-size: 12.5px;
  color: var(--dg-ink-3);
}
.dg-help-row__meta .dg-sep {
  margin: 0 8px;
  color: var(--dg-ink-3);
}
.dg-help-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-left: 10px;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--dg-free);
  background: rgba(30, 158, 99, 0.12);
}
.dg-help-row__chevron {
  color: var(--dg-ink-3);
  flex: none;
  display: flex;
}
.dg-help-empty {
  margin: 0;
  padding: 28px 18px;
  font-size: 13px;
  color: var(--dg-ink-3);
  text-align: center;
}
.dg-help-empty--widget { padding: 8px 0 0; text-align: left; }

.dg-help-aside .dg-widget { margin-bottom: 16px; }
.dg-help-aside .dg-widget:last-child { margin-bottom: 0; }
.dg-help-latest { list-style: none; margin: 0; padding: 0; }
.dg-help-latest li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--dg-line);
}
.dg-help-latest li:first-child { padding-top: 2px; }
.dg-help-latest li:last-child { border-bottom: 0; padding-bottom: 0; }
.dg-help-latest__n {
  flex: none;
  width: 22px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--dg-accent);
}
.dg-help-latest a {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.45;
}
.dg-help-latest a:hover { color: var(--dg-accent); }
.dg-help-hint p {
  margin: 0;
  font-size: 13px;
  color: var(--dg-ink-2);
  line-height: 1.7;
}

@media (max-width: 860px) {
  .dg-help-hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
    margin-bottom: 20px;
  }
  .dg-help-layout { grid-template-columns: 1fr; }
  .dg-help-aside { padding-top: 0; }
  .dg-help-hero__title { font-size: 24px; }
  /* Tighten the help search row so the long placeholder is not clipped by the button. */
  .dg-help-search { height: 42px; }
  .dg-help-search__icon { width: 32px; }
  .dg-help-search input[type="search"] {
    font-size: 13px;
    padding-right: 6px;
  }
  .dg-help-search input[type="search"]::placeholder { font-size: 12.5px; }
  .dg-help-search button { padding: 0 14px; font-size: 13px; }
}
