/* 비회원 사용법 가이드 (guide.js) — 로그인 안 한 사람의 화면에만 붙습니다 */

/* 가이드 층. 열려 있는 창(<dialog>) 안으로 옮겨 붙어도 화면 기준으로 자리를 잡도록 전부 fixed 입니다.
   층 자체는 눌리지 않고(pointer-events:none), 말풍선만 눌립니다. */
.cg-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
}
.cg-layer:not(.is-on) { display: none; }
/* 짚을 곳을 찾는 동안에는 감춰둡니다 (guide.js 의 is-ready) */
.cg-layer:not(.is-ready) .cg-hole,
.cg-layer:not(.is-ready) .cg-bubble { visibility: hidden; }

/* 짚어주는 테두리. 바깥 어둡게 하는 것도 이 한 칸의 그림자로 합니다 */
.cg-hole {
  position: fixed;
  border: 2px solid var(--cherry);
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(36, 33, 29, 0.5);
  transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease;
  pointer-events: none;
}

/* 말풍선 */
.cg-bubble {
  position: fixed;
  width: min(330px, calc(100vw - 24px));
  padding: 12px 14px 10px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 10px 34px rgba(36, 33, 29, 0.3);
  pointer-events: auto;
}
.cg-top { display: flex; align-items: center; justify-content: space-between; }
.cg-count { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.cg-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: -6px -8px -6px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.cg-x svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* 말풍선에는 제목 한 줄만 둡니다 (설명 글 없음 — 2026-10-20) */
.cg-title {
  margin: 2px 0 0;
  font-family: "Gowun Batang", Georgia, "Noto Serif KR", serif;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.4;
  word-break: keep-all;
}

.cg-extra:empty { display: none; }
.cg-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

/* 예약 문자 미리보기 — 문자 앱처럼 */
.cg-sms {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 12px 12px 12px 3px;
  background: var(--accent-soft);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink);
}
.cg-sms span { display: block; }

.cg-foot { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.cg-bar { flex: 1; height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; }
.cg-bar i { display: block; height: 100%; border-radius: 2px; background: var(--cherry); transition: width 0.25s ease; }

.cg-next {
  height: 33px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink); /* 주요 단추 = 검정 (2026-11-11) */
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.cg-next[hidden] { display: none; }
.cg-skip {
  height: 33px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.cg-skip[hidden] { display: none; }

/* 자동등록 창에 선정 문자를 넣을 때 한 번 반짝 */
.cg-flash { animation: cg-flash 0.9s ease; }
@keyframes cg-flash {
  0% { background: #eaf4ec; }
  100% { background: var(--surface); }
}

/* "1분만 둘러보실래요?" */
.cg-ask {
  width: min(340px, calc(100% - 32px));
  margin: auto;
  padding: 26px 22px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  text-align: center;
  box-shadow: 0 12px 40px rgba(36, 33, 29, 0.18);
}
.cg-ask::backdrop { background: rgba(36, 33, 29, 0.45); }
.cg-ask img { width: 46px; height: 44px; }
.cg-ask h2 {
  margin: 10px 0 20px;
  font-family: "Gowun Batang", Georgia, "Noto Serif KR", serif;
  font-size: 19px;
  font-weight: 700;
  word-break: keep-all;
}
.cg-ask-go {
  display: block;
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.cg-ask-no {
  margin: 10px 0 0;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* 다시 보기 — 왼쪽 아래, 하단 바 위 */
.cg-help {
  position: fixed;
  left: 12px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #ecd9d4;
  border-radius: 999px;
  background: #f8ece9;
  color: var(--cherry);
  cursor: pointer;
}
.cg-help[hidden] { display: none; }
.cg-help svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 600px) {
  .cg-bubble { width: calc(100vw - 20px); }
}
