/* guide.css — v63 기초등록 가이드 (신규 디자인)
   #gd 스코프 전용 — retro/official 테마와 독립적으로 동작합니다. */

#gd {
  color: #1c2430;
  font-family: 'ES Emoji', 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
  /* margin은 gdStick()이 #content 실제 패딩에서 계산해 넣습니다 (테마별로 다름) */
  background: #eef0e6;
  min-height: calc(100vh - var(--gdtop));
}
#gd * { box-sizing: border-box; }
#gd a { color: #5a6636; text-decoration: none; }
#gd a:hover { color: #4d5434; text-decoration: underline; }

@keyframes gdUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#gd .gdanim { animation: gdUp .14s ease-out; }

/* ---------- 헤더 ---------- */
#gd { --gdtop: 0px; }
#gd .gdhead {
  position: sticky; top: var(--gdtop); z-index: 12;
  background: #fff; border-bottom: 1px solid #dcd8c0;
}
#gd .gdhr { display: flex; align-items: center; gap: 12px; padding: 13px 22px; flex-wrap: wrap; }
#gd .gdtt { min-width: 0; flex: 1 1 260px; }
#gd .gdcrumb { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #98a08a; font-weight: 600; }
#gd .gdcrumb i { font-style: normal; }
#gd .gdcrumb i.on { color: #6b7160; }
#gd .gdtl { display: flex; align-items: center; gap: 9px; margin-top: 3px; flex-wrap: wrap; }
#gd .gdtl b { font-size: 20px; font-weight: 800; letter-spacing:-.4px; }
#gd .gdcount {
  background: #ecead7; color: #4d5434; font-size: 11.5px; font-weight: 700;
  border-radius: 6px; padding: 2px 8px; white-space: nowrap;
}
#gd .gdacts { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
#gd .gdbar { height: 4px; background: #e8e5d1; }
#gd .gdbar > i { display: block; height: 4px; background: #5a6636; transition: width .25s; }

/* ---------- 버튼 ---------- */
#gd button.gdb {
  padding: 7px 13px; border: 1px solid #dcd8c0; border-radius: 9px; background: #fff;
  font: inherit; font-size: 12.5px; font-weight: 600; color: #4f5644; cursor: pointer;
  white-space: nowrap; line-height: 1.2; transition: background .12s, border-color .12s, color .12s;
}
#gd button.gdb:hover { border-color: #5a6636; color: #4d5434; }
#gd button.gdb.on { background: #ecead7; color: #4d5434; border-color: #c9c5a1; font-weight: 700; }
#gd button.gdb.pri { background: #5a6636; border-color: #5a6636; color: #fff; font-weight: 700; }
#gd button.gdb.pri:hover { background: #4d5434; border-color: #4d5434; color: #fff; }
#gd button.gdb.sm { padding: 6px 11px; font-size: 11.5px; font-weight: 700; }
#gd button.gdb.tpl { border-color: #c9c5a1; background: #f5f4e7; color: #4d5434; }
#gd button.gdb.tpl:hover { border-color: #5a6636; }
#gd button.gdb.ghost { background: #fff; color: #4d5434; border-color: #5a6636; font-weight: 700; }
#gd button.gdb.ghost:hover { background: #5a6636; color: #fff; }
#gd button.gdb.wide { width: 100%; justify-content: center; padding: 10px; font-size: 12.5px; border-radius: 10px; }
#gd button.gdb[disabled] { opacity: .5; cursor: default; }

/* ---------- 본문 ---------- */
#gd .gdmain { max-width: 1240px; margin: 0 auto; padding: 18px 20px 70px; }
#gd .gdlay { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
#gd .gdcol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#gd .gdside { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--gdtop) + 74px); }

/* ---------- 단계 그룹 ---------- */
#gd .gdph { min-width: 0; }
#gd .gdphh { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; flex-wrap: wrap; }
#gd .gdphi {
  width: 26px; height: 26px; flex: none; border-radius: 8px; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center;
}
#gd .gdphh b { font-size: 13.5px; letter-spacing:-.2px; }
#gd .gdphh em { font-style: normal; font-size: 11.5px; color: #98a08a; }
#gd .gdphh i { font-style: normal; margin-left: auto; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
#gd .gdsteps { display: flex; flex-direction: column; gap: 8px; }

/* ---------- 단계 카드 ---------- */
#gd .gdst { background: #fff; border: 1.5px solid #dcd8c0; border-radius: 12px; overflow: hidden; min-width: 0; }
#gd .gdst.ok { border-color: #cbdcb6; }
#gd .gdsr { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; min-width: 0; flex-wrap: wrap; }
#gd .gdnum {
  flex: none; width: 26px; height: 26px; margin-top: 1px; padding: 0;
  border: 1.5px solid #c9c5a1; border-radius: 99px; background: #fff; color: #4d5434;
  font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer; line-height: 1;
}
#gd .gdnum.ok { border-color: #4d7c2f; background: #4d7c2f; color: #fff; }
#gd .gdbody { flex: 1 1 300px; min-width: 0; }
#gd .gdh { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
#gd .gdh b { font-size: 13.5px; }
#gd .gdst.ok .gdh b { color: #98a08a; text-decoration: line-through; }
#gd .gdbadge { font-size: 10.5px; font-weight: 800; border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
#gd .gdbadge.master { background: #eef0e6; color: #5b6b4a; }
#gd .gdbadge.rec { background: #fff4e6; color: #8f6708; }
#gd .gddep { font-size: 10.5px; color: #98a08a; white-space: nowrap; }
#gd .gdcnt { font-size: 11.5px; font-weight: 700; color: #3f6626; background: #e9f0e0; border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
#gd .gddesc { display: block; font-size: 12.5px; color: #6b7160; margin-top: 4px; line-height: 1.6; }
#gd .gdpath { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
#gd .gdpath span { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 3px 8px; background: #eef0e6; color: #4f5644; white-space: nowrap; }
#gd .gdpath span.last { background: #ecead7; color: #4d5434; }
#gd .gdpath i { font-style: normal; font-size: 10.5px; color: #c6c8b4; }
#gd .gdsa { flex: none; display: flex; gap: 6px; align-items: center; }

/* ---------- 팁 패널 ---------- */
#gd .gdtip { padding: 12px 15px 14px; border-top: 1px solid #edebdb; background: #fbfaf2; animation: gdUp .12s ease-out; }
#gd .gdtipg { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px; min-width: 0; }
#gd .gdtipc { padding: 10px 12px; border: 1px solid #e8e5d1; border-radius: 9px; background: #fff; min-width: 0; }
#gd .gdtipc b { display: block; font-size: 10.5px; font-weight: 800; color: #98a08a; }
#gd .gdtipc span { display: block; font-size: 11.5px; color: #3a4030; margin-top: 4px; line-height: 1.55; word-break: break-word; }
#gd .gdtipc span.warn { color: #8f6708; }
#gd .gdtipb { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }

/* ---------- 사이드 카드 ---------- */
#gd .gdcard { background: #fff; border: 1px solid #dcd8c0; border-radius: 12px; padding: 15px 16px; }
#gd .gdcard > b { font-size: 12.5px; }
#gd .gdpr { display: flex; align-items: baseline; gap: 7px; }
#gd .gdpr b { font-size: 24px; letter-spacing:-.4px; font-variant-numeric: tabular-nums; }
#gd .gdpr span { font-size: 12.5px; color: #98a08a; }
#gd .gdpr i { font-style: normal; margin-left: auto; font-size: 12.5px; font-weight: 800; color: #4d5434; }
#gd .gdpb { height: 6px; border-radius: 99px; background: #e8e5d1; margin-top: 9px; overflow: hidden; }
#gd .gdpb > i { display: block; height: 6px; border-radius: 99px; background: #5a6636; transition: width .25s; }
#gd .gdnote { font-size: 11.5px; color: #6b7160; margin-top: 10px; line-height: 1.6; }
#gd .gdlist { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
#gd .gdlist > div { display: flex; gap: 8px; align-items: flex-start; }
#gd .gdtag { flex: none; font-size: 11.5px; font-weight: 800; color: #4d5434; background: #ecead7; border-radius: 5px; padding: 2px 6px; white-space: nowrap; }
#gd .gdlist p { flex: 1; min-width: 0; margin: 0; font-size: 11.5px; color: #3a4030; line-height: 1.55; }
#gd .gdroles { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
#gd .gdroles button { padding: 5px 10px; border-radius: 99px; font-size: 11.5px; }
#gd .gdsmall { font-size: 11.5px; color: #98a08a; margin-top: 10px; line-height: 1.55; }

/* ---------- 다크 도움말 카드 ---------- */
#gd .gddark { background: #101828; border-radius: 12px; padding: 15px 16px; color: #cbd3e1; }
#gd .gddark > b { font-size: 12.5px; color: #fff; }
#gd .gddark .gdlist { gap: 6px; }
#gd .gddark button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border: 1px solid #454c2f; border-radius: 8px; background: #2f3524;
  font: inherit; font-size: 12.5px; color: #e6eaf2; cursor: pointer; text-align: left;
}
#gd .gddark button:hover { background: #1c2b47; border-color: #3b4c6d; }
#gd .gddark button span:first-child { font-size: 12.5px; flex: none; }

/* ---------- 체크리스트 뷰 ---------- */
#gd .gdtb { width: 100%; border-collapse: collapse; background: #fff; }
#gd .gdtbw { background: #fff; border: 1px solid #dcd8c0; border-radius: 12px; overflow: hidden; }
#gd .gdtb th {
  text-align: left; font-size: 11.5px; font-weight: 800; color: #98a08a;
  padding: 10px 12px; border-bottom: 1px solid #e8e5d1; background: #fbfaf2; white-space: nowrap;
}
#gd .gdtb td { font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid #edebdb; vertical-align: top; }
#gd .gdtb tr:last-child td { border-bottom: 0; }
#gd .gdtb tr.ok td { color: #98a08a; }
#gd .gdtb td.ctr { text-align: center; }
#gd .gdtb .gdpath { margin-top: 0; }
#gd .gdok { font-size: 11.5px; font-weight: 800; border-radius: 5px; padding: 2px 8px; white-space: nowrap; }
#gd .gdok.y { background: #e9f0e0; color: #3f6626; }
#gd .gdok.n { background: #eef0e6; color: #98a08a; }

/* ---------- 토스트 ---------- */
#gd .gdtoast {
  position: fixed; right: 20px; bottom: 22px; z-index: 99;
  padding: 11px 15px; border-radius: 11px; background: #1c2430; color: #fff;
  font-size: 12.5px; font-weight: 600; box-shadow: 0 14px 34px rgba(16, 24, 40, .3);
  animation: gdUp .14s ease-out;
}

/* ---------- 반응형 ---------- */
@media (max-width: 1080px) {
  #gd .gdlay { grid-template-columns: minmax(0, 1fr); }
  #gd .gdside { position: static; }
}
@media (max-width: 760px) {
  #gd .gdhr { padding: 11px 14px; gap: 9px; }
  #gd .gdtl b { font-size: 17px; }
  #gd .gdmain { padding: 14px 12px 80px; }
  #gd .gdsr { padding: 12px 13px; gap: 9px; }
  #gd .gdsa { width: 100%; }
  #gd .gdsa button { flex: 1; }
  #gd .gdbody { flex-basis: 100%; }
  #gd .gdtoast { left: 14px; right: 14px; bottom: 14px; text-align: center; }
  #gd .gdtbw { overflow-x: auto; }
  #gd .gdtb { min-width: 640px; }
}
