/* 미니게임 허브 — 설치 방법 (어두운 사이트 기준) */
.gh-main.is-sub .gh-content > .gd { margin-left: max(40px, calc((100% - 1040px) / 2)); margin-right: max(40px, calc((100% - 1040px) / 2)); }
.gd { color: var(--gh-ink, #f3f2ff); font-size: 15.5px; line-height: 1.75; }
.gd b { color: #fff; }
.gd a:not(.gh-btn) { color: #7fe3ff; text-decoration: underline; text-underline-offset: 3px; }
.gd a:not(.gh-btn):hover { color: #fff; }
.gd code { padding: 1px 7px; border-radius: 6px; background: rgba(255, 255, 255, .08); color: #ffd98a; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; word-break: break-all; }
.gd small { color: var(--gh-mute, #a7a9cf); }

/* 머리 */
.gd-hero { margin-bottom: 26px; }
.gd-lead { margin: 0 0 22px; font-size: 16.5px; color: #dcdcf5; }
.gd-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.gd-flow li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px 14px; border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); text-align: center; }
.gd-flow li + li::before { content: '›'; position: absolute; left: -11px; top: 50%; transform: translateY(-50%); color: #36d4ff; font-size: 20px; font-weight: 700; }
.gd-flow i { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 6px; border-radius: 50%; background: linear-gradient(100deg, #ff4fa3, #a46bff 50%, #36d4ff); color: #fff; font-style: normal; font-weight: 800; }
.gd-flow b { font-size: 15px; }
.gd-flow span { color: var(--gh-mute, #a7a9cf); font-size: 12.5px; }

/* 차례 */
.gd-toc { position: sticky; top: 84px; z-index: 5; display: flex; gap: 6px; margin: 0 0 30px; padding: 8px; overflow-x: auto; border-radius: 16px;
    background: rgba(13, 15, 36, .92); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 14px 30px -18px rgba(0, 0, 0, .8); backdrop-filter: blur(8px); scrollbar-width: none; }
.gd-toc::-webkit-scrollbar { display: none; }
.gd-toc a { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 8px; border-radius: 999px; color: #c9cae8 !important; font-size: 13.5px; text-decoration: none !important; white-space: nowrap; }
.gd-toc a i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .08); font-size: 12px; font-style: normal; font-weight: 700; }
.gd-toc a:hover { background: rgba(255, 255, 255, .06); color: #fff !important; }
.gd-toc a.on { background: rgba(164, 107, 255, .22); color: #fff !important; }
.gd-toc a.on i { background: linear-gradient(100deg, #ff4fa3, #36d4ff); color: #fff; }

/* 단계 */
.gd-step { scroll-margin-top: 150px; padding: 30px 0 34px; border-top: 1px solid rgba(255, 255, 255, .08); }
.gd-step:first-of-type { border-top: 0; }
.gd-step h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-family: var(--gh-head, sans-serif); font-size: clamp(21px, 2.4vw, 26px); color: #fff; }
.gd-step h2 i { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #ff4fa3, #a46bff 55%, #36d4ff); font-size: 17px; font-style: normal; font-weight: 800; box-shadow: 0 10px 22px -10px rgba(255, 79, 163, .7); }
.gd-step h3 { margin: 0 0 10px; font-size: 16px; color: #fff; }
.gd-step p { margin: 0 0 14px; }
.gd-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; margin: 4px 0 16px; }

.gd-check { margin: 0 0 14px; padding: 0; list-style: none; }
.gd-check li { position: relative; padding: 7px 0 7px 30px; border-bottom: 1px dashed rgba(255, 255, 255, .08); }
.gd-check li:last-child { border-bottom: 0; }
.gd-check li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 16px; height: 16px; border-radius: 5px; background: linear-gradient(135deg, #36d4ff, #4fe0a0); }
.gd-check li::after { content: ''; position: absolute; left: 8px; top: 15px; width: 4px; height: 8px; border: solid #0b0d22; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.gd-note, .gd-tip { padding: 16px 18px; border-radius: 14px; font-size: 14.5px; }
.gd-note { background: rgba(255, 207, 63, .1); box-shadow: inset 0 0 0 1px rgba(255, 207, 63, .32); color: #f6e7bd; }
.gd-note .gh-btn { margin-top: 12px; }
.gd-tip { margin: 0 0 16px; background: rgba(54, 212, 255, .08); box-shadow: inset 0 0 0 1px rgba(54, 212, 255, .3); color: #cdeefb; }

.gd-card, .gd-howto { padding: 18px 20px; border-radius: 16px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.gd-card ol, .gd-howto ol { margin: 0 0 12px; padding-left: 20px; }
.gd-card li, .gd-howto li { margin-bottom: 6px; }
.gd-howto h3 + ol { margin-top: 0; }

/* 캡처 */
.gd-shot { margin: 6px 0 22px; }
.gd-shot a { display: block; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 24px 44px -26px rgba(0, 0, 0, .9); }
.gd-shot img { display: block; width: 100%; height: auto; transition: transform .25s; }
.gd-shot a:hover img { transform: scale(1.01); }
.gd-shot figcaption { margin-top: 10px; color: var(--gh-mute, #a7a9cf); font-size: 13.5px; line-height: 1.6; }
.gd-shot figcaption b { color: #e4e4fb; }

/* 폴더 그림 */
.gd-tree { margin: 4px 0 16px; padding: 16px 18px 12px; border-radius: 16px; background: #0b0d22; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.6; }
.gd-tree-hd { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #fff; font-weight: 700; }
.gd-tree-hd small { margin-left: 6px; font-family: var(--gb-font, sans-serif); font-weight: 400; }
.gd-tree ul { margin: 0; padding: 0 0 0 18px; list-style: none; }
.gd-tree > ul { padding-left: 0; }
.gd-tree li { position: relative; padding: 3px 0 3px 24px; color: #c9cae8; }
.gd-tree li::before { content: ''; position: absolute; left: 2px; top: 9px; width: 14px; height: 11px; border-radius: 2px; background: rgba(255, 255, 255, .25); }
.gd-tree li.is-dir::before { background: #ffcf3f; border-radius: 1px 4px 2px 2px; }
.gd-tree li.is-key { color: #fff; font-weight: 700; }
.gd-tree li.is-key::before { background: #ff4fa3; }
.gd-tree li.is-lic { color: #7fe3ff; font-weight: 700; }
.gd-tree li.is-lic::before { background: #36d4ff; }
.gd-tree li em { margin-left: 6px; color: #ff9fcd; font-family: var(--gb-font, sans-serif); font-style: normal; font-weight: 600; font-size: 12.5px; }
.gd-tree li small { margin-left: 6px; font-family: var(--gb-font, sans-serif); font-size: 12px; }

/* 코드 */
.gd-code { position: relative; margin: 0 0 18px; padding: 16px 18px; overflow-x: auto; border-radius: 14px; background: #070816; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
    color: #d6f6ff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7; white-space: pre; }
.gd-copy { position: sticky; float: right; left: 100%; top: 0; margin: -6px -8px 4px 12px; padding: 4px 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .1);
    color: #fff; font-size: 12px; font-family: var(--gb-font, sans-serif); cursor: pointer; }
.gd-copy:hover { background: rgba(255, 255, 255, .2); }

/* 표 */
.gd-tbl { width: 100%; margin: 4px 0 18px; border-collapse: separate; border-spacing: 0; overflow: hidden; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); font-size: 14px; }
.gd-tbl th, .gd-tbl td { padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); text-align: left; vertical-align: top; }
.gd-tbl th { background: rgba(255, 255, 255, .05); color: var(--gh-mute, #a7a9cf); font-size: 13px; }
.gd-tbl tr:last-child td { border-bottom: 0; }

/* 활성화 흐름 */
.gd-act { display: flex; align-items: stretch; gap: 8px; margin: 0 0 18px; }
.gd-act div { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 14px 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); text-align: center; }
.gd-act div b { font-size: 15px; }
.gd-act div span { color: var(--gh-mute, #a7a9cf); font-size: 12.5px; }
.gd-act div.is-ok { background: rgba(79, 224, 160, .1); box-shadow: inset 0 0 0 1px rgba(79, 224, 160, .4); }
.gd-act > i { align-self: center; color: #36d4ff; font-style: normal; font-weight: 800; }

/* 문제 해결 */
.gd-faq details { margin-bottom: 10px; border-radius: 14px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.gd-faq summary { position: relative; padding: 15px 44px 15px 18px; color: #fff; font-weight: 700; cursor: pointer; list-style: none; }
.gd-faq summary::-webkit-details-marker { display: none; }
.gd-faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: #36d4ff; font-size: 20px; }
.gd-faq details[open] summary::after { content: '−'; }
.gd-faq details p { margin: 0; padding: 0 18px 16px; color: #d4d5ef; font-size: 14.5px; }
.gd-help { margin-top: 16px; color: var(--gh-mute, #a7a9cf); }

@media (max-width: 960px) {
    .gh-main.is-sub .gh-content > .gd { margin-left: 18px; margin-right: 18px; }
    .gd-cols { grid-template-columns: 1fr; }
    .gd-toc { top: 70px; }
}
@media (max-width: 600px) {
    .gh-main.is-sub .gh-content > .gd { margin-left: 12px; margin-right: 12px; }
    .gd { font-size: 15px; }
    .gd-flow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
    .gd-flow li { padding: 10px 2px; border-radius: 12px; }
    .gd-flow li + li::before { display: none; }
    .gd-flow i { width: 24px; height: 24px; font-size: 12px; }
    .gd-flow b { font-size: 11.5px; line-height: 1.3; }
    .gd-flow span { display: none; }
    .gd-step { padding: 24px 0 26px; }
    .gd-act { flex-direction: column; }
    .gd-act > i { transform: rotate(90deg); }
    .gd-tbl th, .gd-tbl td { padding: 10px; font-size: 13px; }
    .gd-code { font-size: 12px; padding: 14px; }
}
.gd-code { padding-top: 44px; }
.gd-copy { position: absolute; float: none; left: auto; top: 10px; right: 10px; margin: 0; }
.gd-tbl td:nth-child(2), .gd-tbl th:nth-child(2) { white-space: nowrap; }
.gd-h3 { margin: 22px 0 10px; font-size: 17px; color: #fff; }
.gd-ol { margin: 0 0 12px; padding-left: 22px; }
.gd-ol li { margin-bottom: 6px; }
.gd-small { color: var(--gh-mute, #a7a9cf); font-size: 13.5px; }
.gd-quote { margin: 10px 0 4px; padding: 12px 14px; border-left: 3px solid #ff4fa3; border-radius: 0 10px 10px 0; background: rgba(255, 79, 163, .08); color: #ffd2e7; font-size: 14px; }
