/* 新手教學百科（guide.html）：C「分頁百科」。共用 library.css 的頁首。 */
.gd .lib__head { margin-bottom: 22px; }

/* 分頁 */
.gd__tabs { position: sticky; top: calc(var(--nav-h) + 8px); z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; padding: 8px; border-radius: 16px;
  background: rgba(12, 19, 52, .92); border: 1px solid rgba(233, 196, 124, .25); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.gd__tabs a { padding: 9px 16px; border-radius: 11px; color: #c9d2f5; font-weight: 700; font-size: 15px; white-space: nowrap; transition: background-color .15s ease, color .15s ease, transform .15s ease; }
.gd__tabs a:hover { color: var(--gold-hi); background: rgba(233, 196, 124, .1); }
.gd__tabs a.is-on { color: #1b1200; background: linear-gradient(180deg, #fbe6b4, #d9a24f); box-shadow: 0 4px 14px rgba(233, 196, 124, .35); }
.gd__tabs a:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.gd__new { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 700 11px var(--sans); color: #1b1200; background: linear-gradient(90deg, #f8e1a8, #e9a94c); margin-left: 4px; vertical-align: 2px; }
.gd__tabs a.is-on .gd__new { background: #1b1200; color: var(--gold-hi); }

/* 內容 */
.gd__panel { padding-top: 22px; scroll-margin-top: calc(var(--nav-h) + 80px); }
.gd.has-js .gd__panel:not(.is-on) { display: none; }
.gd.has-js .gd__panel.is-on { animation: gd-in .35s ease; }
@keyframes gd-in { from { opacity: 0; transform: translateY(8px); } }
.gd__h { font: 900 26px var(--serif); color: var(--gold-hi); margin: 10px 0 14px; }
.gd__h:not(:first-child) { margin-top: 34px; }
.gd__card { position: relative; border-radius: var(--radius); background: linear-gradient(170deg, #182660, #0b1230); border: 1px solid rgba(233, 196, 124, .26); padding: 20px 22px;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
.gd__card:hover { border-color: rgba(233, 196, 124, .6); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.gd__card h3 { font: 700 20px var(--serif); color: var(--gold-hi); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gd__card p, .gd__card li { color: #c3cbec; font-size: 15px; line-height: 1.75; }
.gd__card p + p { margin-top: 8px; }
.gd__card a, .gd__route a, .gd__faq a { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }
.gd code { color: #a9e4ff; background: rgba(110, 160, 255, .13); padding: 1px 6px; border-radius: 5px; font-size: .92em; white-space: nowrap; }
.gd .kbd { display: inline-block; min-width: 26px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--gold); background: rgba(233, 196, 124, .1); color: var(--gold-hi); font: 700 13px var(--sans); text-align: center; box-shadow: 0 2px 0 rgba(233, 196, 124, .35); white-space: nowrap; }
.gd__note { color: #9fa9d6; font-size: 14px; margin-top: 10px; }
.gd__note--top { margin: 0 0 14px; }
.gd__tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 700 11px var(--sans); }
.gd__tag--r { border: 1px solid #7aa2ff; color: #b8cbff; }
.gd__tag--s { border: 1px solid #6fe0a8; color: #b9f3d6; }
.gd__list { padding-left: 1.1em; display: grid; gap: 4px; }
.gd__list b { color: var(--ivory); }
.gd__grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gd__grid2--wide { grid-template-columns: 1.25fr 1fr; }
.gd__grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.gd__card--new { border-color: rgba(233, 196, 124, .45); background: radial-gradient(circle at 100% 0, rgba(233, 196, 124, .14), transparent 45%), linear-gradient(170deg, #1b2a68, #0b1230); }
.gd__coin h3 img { width: 28px; height: 28px; }

/* 三步驟 */
.gd__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; padding: 0; }
.gd__no { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 12px; border-radius: 50%; font: 700 18px var(--latin); color: var(--gold-hi);
  border: 1.5px solid var(--gold); background: radial-gradient(circle at 35% 30%, #2b3d86, #0e1638); box-shadow: 0 0 0 4px rgba(233, 196, 124, .1), 0 0 18px rgba(233, 196, 124, .25); }

/* 第一天路線 */
.gd__route { counter-reset: r; display: grid; gap: 10px; list-style: none; padding: 0; }
.gd__route li { position: relative; padding: 13px 16px 13px 64px; border-radius: 12px; background: rgba(20, 32, 82, .7); border: 1px solid rgba(233, 196, 124, .16); color: #c3cbec; font-size: 15px; line-height: 1.7; transition: border-color .2s ease, background-color .2s ease; }
.gd__route li:hover { border-color: rgba(233, 196, 124, .5); background: rgba(26, 40, 98, .85); }
.gd__route li::before { counter-increment: r; content: counter(r); position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--latin); color: #1b1200; background: radial-gradient(circle at 35% 30%, #fbe6b4, #d29a45); box-shadow: 0 0 12px rgba(233, 196, 124, .45); }
.gd__route b { color: var(--gold-hi); }

/* 職業與按鍵 */
.gd__classes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.gd__classes div { padding: 12px 6px; text-align: center; border-radius: 12px; background: rgba(20, 32, 82, .7); border: 1px solid rgba(233, 196, 124, .18); transition: border-color .2s ease, transform .2s ease; }
.gd__classes div:hover { border-color: var(--gold); transform: translateY(-2px); }
.gd__classes b { display: block; color: var(--gold-hi); font: 700 17px var(--serif); }
.gd__classes span { display: block; font-size: 12px; color: #9fa9d6; margin-top: 2px; }
.gd__keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 6px; }
.gd__keys div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: rgba(20, 32, 82, .7); color: #c9d2f5; font-size: 14px; }

/* 指令表 */
.gd__search { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; border: 1px solid rgba(233, 196, 124, .35); background: rgba(6, 10, 30, .55); color: var(--gold); }
.gd__search svg { width: 20px; height: 20px; flex: none; }
.gd__search input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--ivory); font: inherit; font-size: 16px; outline: none; }
.gd__search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233, 196, 124, .15); }
.gd__cmds { padding: 8px 18px; }
.gd__cmds:hover { transform: none; }
.gd__cmds table { width: 100%; border-collapse: collapse; }
.gd__cmds th { text-align: left; font: 700 12px var(--latin); letter-spacing: .16em; color: var(--gold); padding: 12px 8px; border-bottom: 1px solid rgba(233, 196, 124, .25); }
.gd__cmds td { padding: 10px 8px; border-bottom: 1px dashed rgba(233, 196, 124, .14); color: #c3cbec; font-size: 15px; vertical-align: top; }
.gd__cmds td:first-child { width: 42%; }
.gd__cmds tbody tr { transition: background-color .12s ease; }
.gd__cmds tbody tr:hover { background: rgba(233, 196, 124, .06); }
.gd__cmds mark { background: rgba(233, 196, 124, .35); color: inherit; border-radius: 3px; }
.gd__empty { padding: 14px 8px; }
.gd__faq { max-width: none; }

@media (max-width: 960px) {
  .gd__grid3 { grid-template-columns: repeat(2, 1fr); }
  .gd__grid2--wide { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .gd__tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; border-radius: 0; border-inline: 0; }
  .gd__tabs::-webkit-scrollbar { display: none; }
  .gd__grid2, .gd__grid3, .gd__steps { grid-template-columns: 1fr; }
  .gd__classes { grid-template-columns: repeat(2, 1fr); }
  .gd__keys { grid-template-columns: 1fr; }
  .gd__cmds { padding: 4px 10px; }
  .gd__cmds td:first-child { width: auto; }
  .gd__cmds thead { display: none; }
  .gd__cmds table, .gd__cmds tbody { display: block; }
  .gd__cmds tr { display: block; padding: 8px 0; border-bottom: 1px dashed rgba(233, 196, 124, .14); }
  .gd__cmds td { display: block; border: 0; padding: 2px 4px; overflow-wrap: anywhere; }
  .gd code { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .gd.has-js .gd__panel.is-on { animation: none; }
  .gd__card, .gd__classes div { transition: none; }
}
