/* ==========================================================================
   MAPLE REMAKE — 게임 안내 (guide.html 전용)
   style.css 토큰만 사용. 게임 웹뷰 호환을 위해 :has() 등 최신 선택자는 쓰지 않는다.
   ========================================================================== */

.gd-page .container {
  width: min(1040px, 100% - 48px);
}

.gd-page .page-body {
  padding: 32px 0 88px;
}

/* 상단 소개 */
.gd-intro {
  padding: 22px 26px;
  margin-bottom: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  font-size: 1.02rem;
  line-height: 1.85;
}

.gd-intro p { margin: 0; }

.gd-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.gd-summary a {
  display: block;
  padding: 16px 16px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s var(--ease);
}

.gd-summary a:hover {
  border-color: var(--accent-deep);
  text-decoration: none;
}

.gd-summary .gd-sum-icon { font-size: 1.4rem; line-height: 1; }
.gd-summary strong { display: block; margin-top: 8px; font-size: 1.02rem; font-weight: 900; }
.gd-summary span { display: block; margin-top: 3px; color: var(--muted); font-size: 0.84rem; line-height: 1.5; }

/* 장 이동 탭 (sticky) */
.gd-tabbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  padding: 10px 0;
  margin-bottom: 8px;
  background: var(--sky-light);
}

.gd-tabbar .filter-tabs { margin-bottom: 0; }
.gd-tabbar .tab-btn { text-decoration: none; display: inline-block; }

/* 장 */
.gd-section {
  margin-top: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  scroll-margin-top: calc(var(--nav-h) + 72px);
}

.gd-section-head {
  padding: 22px 26px 18px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.gd-section-head .gd-eyebrow {
  display: block;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.gd-section-head h2 { margin: 4px 0 8px; font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
.gd-section-head p { margin: 0; line-height: 1.8; }

.gd-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.gd-highlight {
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.gd-highlight strong { display: block; color: var(--accent-deep); font-size: 1.25rem; font-weight: 900; line-height: 1.3; }
.gd-highlight span { display: block; margin-top: 2px; color: var(--muted); font-size: 0.82rem; font-weight: 700; line-height: 1.45; }

.gd-section-body { padding: 6px 26px 24px; }

.gd-block { margin-top: 20px; }
.gd-block h3 { margin: 0 0 10px; font-size: 1.05rem; }
.gd-block p { margin: 0; line-height: 1.85; }
.gd-block strong { font-weight: 900; }

.gd-list { margin: 0; padding-left: 1.2em; line-height: 1.85; }
.gd-list li + li { margin-top: 4px; }

.gd-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.gd-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.gd-table th, .gd-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.6; }
.gd-table thead th { background: var(--cream); color: var(--muted); font-size: 0.8rem; font-weight: 900; white-space: nowrap; }
.gd-table tbody tr:last-child td { border-bottom: 0; }
.gd-table tbody tr:nth-child(even) td { background: #fffdf8; }
.gd-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.gd-callout {
  display: flex;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #cfe6f5;
  border-left: 4px solid var(--sky);
  background: #eef7fd;
  line-height: 1.75;
}

.gd-callout .gd-callout-icon { flex: none; font-size: 1.1rem; line-height: 1.6; }
.gd-callout.tone-tip { border-color: #d3ebcb; border-left-color: var(--grass); background: #eff8ec; }
.gd-callout.tone-warn { border-color: #f6dcbf; border-left-color: var(--accent); background: #fff6ec; }

.gd-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

@media (max-width: 960px) {
  .gd-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gd-tabbar { top: var(--nav-h); }
}

@media (max-width: 600px) {
  .gd-page .container { width: min(1040px, 100% - 24px); }
  .gd-intro { padding: 16px 18px; font-size: 0.97rem; }
  .gd-section-head, .gd-section-body { padding-left: 16px; padding-right: 16px; }
  .gd-table th, .gd-table td { padding: 8px 10px; }
  /* 4열 이상 표는 칸이 눌려 세로로 길어지지 않게 최소 폭을 두고 가로 스크롤 */
  .gd-table.is-wide { min-width: 600px; }
  .gd-table-wrap { -webkit-overflow-scrolling: touch; }
  .gd-tabbar .tab-btn { padding: 8px 14px; }
}

@media print {
  .site-nav, .site-footer, .gd-tabbar, .gd-links { display: none !important; }
  .gd-section { break-inside: avoid-page; box-shadow: none; }
}
