/* ==========================================================================
   guide.css — 머리말 ? · ! 버튼, 사용 설명서, 튜토리얼, 패치노트
   ========================================================================== */
.hdr-icon {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e3e5ea; background: #fff; color: #555;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; position: relative;
  transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out, transform 120ms ease-out;
}
.hdr-icon .ic { width: 17px; height: 17px; vertical-align: 0; color: inherit; margin: 0; }
.hdr-icon:hover { background: #f3f3ff; color: #5046E5; border-color: #d4d2fa; }
.hdr-icon:active { transform: scale(.94); }
.hdr-icon:focus-visible { outline: 2px solid #5046E5; outline-offset: 2px; }
.pn-btn.has-new::after { content: ''; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 2px #fff; }

body.gd-lock { overflow: hidden; }
.gd-overlay {
  position: fixed; inset: 0; z-index: 2600; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(17, 18, 22, .42); opacity: 0; visibility: hidden; transition: opacity 220ms ease-out, visibility 0s linear 220ms;
}
.gd-overlay.open { opacity: 1; visibility: visible; transition: opacity 220ms ease-out; }
.gd-modal {
  background: #fff; border-radius: 16px; width: min(920px, 100%); height: min(640px, calc(100vh - 32px));
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px -12px rgba(15, 18, 30, .35);
  transform: translateY(10px) scale(.985); transition: transform 360ms cubic-bezier(.22, 1, .36, 1);
}
.gd-overlay.open .gd-modal { transform: none; }
.gd-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 14px 20px; border-bottom: 1px solid #eef0f3; flex-shrink: 0; }
.gd-top h3 { margin: 0; font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.gd-top h3 .ic { color: #5046E5; }
.gd-close { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: #666; display: inline-flex; align-items: center; justify-content: center; transition: background-color 150ms ease-out; }
.gd-close:hover { background: #f1f2f6; }
.gd-close .ic { width: 18px; height: 18px; vertical-align: 0; }
.gd-wrap { display: flex; flex: 1; min-height: 0; }
.gd-side { width: 230px; flex-shrink: 0; border-right: 1px solid #eef0f3; display: flex; flex-direction: column; background: #fafbfc; }
.gd-search { position: relative; padding: 10px; border-bottom: 1px solid #eef0f3; }
.gd-search svg { position: absolute; left: 20px; top: 50%; width: 13px; height: 13px; transform: translateY(-50%); color: #8a8f98; pointer-events: none; }
.gd-search input { width: 100%; height: 32px; border: 1px solid #e3e6ea; border-radius: 8px; padding: 0 10px 0 30px; font: inherit; font-size: 13px; background: #fff; }
.gd-search input:focus { outline: none; border-color: #5046E5; box-shadow: 0 0 0 3px rgba(80, 70, 229, .12); }
.gd-nav { flex: 1; overflow-y: auto; padding: 6px; }
.gd-group { font-size: 11px; color: #8a8f98; padding: 10px 10px 4px; }
.gd-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; font: inherit; font-size: 13px; color: #333; cursor: pointer; word-break: keep-all; transition: background-color 140ms ease-out, color 140ms ease-out; }
.gd-item:hover { background: #f0f0fb; }
.gd-item.active { background: #ecebfd; color: #3f36c9; font-weight: 600; }
.gd-hit { font-size: 11px; color: #5046E5; background: #fff; border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.gd-empty { padding: 16px 10px; font-size: 12px; color: #8a8f98; word-break: keep-all; }
.gd-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.gd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.gd-title { font-size: 18px; font-weight: 600; color: #222; word-break: keep-all; }
.gd-summary { margin: 6px 0 0; font-size: 13px; color: #555; line-height: 1.65; word-break: keep-all; }
.gd-head-act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.gd-tour { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border: 0; border-radius: 10px; background: #5046E5; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color 150ms ease-out, transform 120ms ease-out; }
.gd-tour:hover:not(:disabled) { background: #4038c7; }
.gd-tour:active:not(:disabled) { transform: scale(.97); }
.gd-tour:disabled { background: #d9dbe2; cursor: not-allowed; }
.gd-tour .ic { width: 13px; height: 13px; vertical-align: 0; }
.gd-note { font-size: 11px; color: #8a8f98; white-space: nowrap; }
.gd-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gd-step { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 14px; border: 1px solid #eef0f3; border-radius: 12px; animation: gdIn 360ms cubic-bezier(.22, 1, .36, 1) both; }
.gd-num { width: 26px; height: 26px; border-radius: 50%; background: #ecebfd; color: #3f36c9; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-variant-numeric: tabular-nums; }
.gd-step-body h4 { margin: 2px 0 4px; font-size: 14px; font-weight: 600; color: #222; word-break: keep-all; }
.gd-step-body p { margin: 0; font-size: 13px; color: #555; line-height: 1.6; word-break: keep-all; }
.gd-show { border: 1px solid #e3e5ea; background: #fff; border-radius: 8px; height: 30px; padding: 0 10px; font: inherit; font-size: 12px; font-weight: 600; color: #444; cursor: pointer; white-space: nowrap; transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out; }
.gd-show:hover { background: #f3f3ff; border-color: #d4d2fa; color: #5046E5; }
/* 짧은 움직임: 손가락이 그 버튼을 누르는 모습 */
.gd-demo { position: relative; display: inline-flex; margin-top: 10px; height: 30px; align-items: center; }
.gd-target { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid #dcdcf7; background: #f7f7ff; color: #3f36c9; font-size: 12px; white-space: nowrap; animation: gdPress 2.4s cubic-bezier(.22, 1, .36, 1) infinite; }
.gd-cursor { position: absolute; right: -14px; bottom: -8px; width: 16px; height: 16px; color: #333; animation: gdCursor 2.4s cubic-bezier(.22, 1, .36, 1) infinite; }
@keyframes gdIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes gdCursor { 0% { transform: translate(18px, 14px); opacity: 0; } 25% { opacity: 1; } 45% { transform: translate(0, 0); } 52% { transform: translate(0, 0) scale(.85); } 60% { transform: translate(0, 0); } 100% { transform: translate(0, 0); opacity: 0; } }
@keyframes gdPress { 0%, 44% { background: #f7f7ff; box-shadow: none; } 52% { background: #ecebfd; box-shadow: 0 0 0 4px rgba(80, 70, 229, .14); } 70%, 100% { background: #f7f7ff; box-shadow: none; } }

/* 튜토리얼: 짚는 테두리와 설명 상자 */
.tour-spot {
  position: fixed; left: 0; top: 0; z-index: 2700; border-radius: 10px; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 3px #5046E5, 0 0 0 9999px rgba(17, 18, 22, .45);
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1), width 420ms cubic-bezier(.22, 1, .36, 1), height 420ms cubic-bezier(.22, 1, .36, 1), opacity 200ms ease-out;
}
.tour-spot.on { opacity: 1; }
.tour-card {
  position: fixed; left: 0; top: 0; z-index: 2701; width: min(320px, calc(100vw - 20px)); background: #fff; border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 16px 40px -10px rgba(15, 18, 30, .4); opacity: 0;
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1), opacity 200ms ease-out;
}
.tour-card.on { opacity: 1; }
.tour-card.wait { opacity: .6; }
.tc-step { font-size: 11px; color: #8a8f98; font-variant-numeric: tabular-nums; word-break: keep-all; }
.tour-card h4 { margin: 6px 0 4px; font-size: 15px; font-weight: 600; color: #222; word-break: keep-all; }
.tour-card p { margin: 0; font-size: 13px; color: #555; line-height: 1.6; word-break: keep-all; }
.tc-bar { height: 3px; background: #eef0f3; border-radius: 3px; margin: 12px 0 10px; overflow: hidden; }
.tc-bar i { display: block; height: 100%; background: #5046E5; transform-origin: left; transition: transform 420ms cubic-bezier(.22, 1, .36, 1); }
.tc-actions { display: flex; justify-content: flex-end; gap: 6px; }
.tc-actions button { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid #e3e5ea; background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: #444; cursor: pointer; white-space: nowrap; }
.tc-actions .tc-skip { margin-right: auto; border-color: transparent; color: #8a8f98; }
.tc-actions .tc-next { background: #5046E5; border-color: #5046E5; color: #fff; }

/* 패치노트 */
.pn-modal { width: min(560px, 100%); height: auto; max-height: min(680px, calc(100vh - 32px)); }
.pn-body { flex: 1; overflow-y: auto; padding: 6px 20px 16px; }
.pn-date { font-size: 12px; color: #8a8f98; padding: 14px 0 6px; font-variant-numeric: tabular-nums; }
.pn-item { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 14px; border: 1px solid #eef0f3; border-radius: 12px; margin-bottom: 10px; animation: gdIn 360ms cubic-bezier(.22, 1, .36, 1) both; }
.pn-item-main { min-width: 0; }
.pn-item h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: #222; word-break: keep-all; }
.pn-item p { margin: 0; font-size: 13px; color: #555; line-height: 1.6; word-break: keep-all; }
.pn-where { margin-top: 8px; font-size: 12px; color: #6b6f78; display: inline-flex; align-items: center; gap: 4px; word-break: keep-all; }
.pn-where .ic { width: 13px; height: 13px; vertical-align: 0; color: #8a8f98; }
.pn-tour { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; }
.pn-tour .ic { width: 12px; height: 12px; vertical-align: 0; }
.pn-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid #eef0f3; flex-shrink: 0; }

@media (max-width: 640px) {
  .gd-modal { height: calc(100vh - 32px); }
  .gd-wrap { flex-direction: column; }
  .gd-side { width: auto; max-height: 38%; border-right: 0; border-bottom: 1px solid #eef0f3; }
  .gd-body { padding: 16px; }
  .gd-head { flex-direction: column; }
  .gd-head-act { align-items: flex-start; }
  .gd-step { grid-template-columns: 26px 1fr; }
  .gd-step .gd-show { grid-column: 2; justify-self: start; }
  .pn-item { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .gd-overlay, .gd-modal, .tour-spot, .tour-card, .tc-bar i { transition: none !important; }
  .gd-step, .pn-item, .gd-target, .gd-cursor { animation: none !important; }
  .gd-cursor { opacity: 0; }
}
