/* ==========================================================================
   site-guide-1.0.4.css — 홈 이용 가이드 (www/@includes/site-guide.php)
   ========================================================================== */

.sg {
    position: fixed;
    inset: 0;
    /* 채널톡(#ch-plugin, 10000000) 버튼까지 어둡게 덮는다 */
    z-index: 10000010;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sg[hidden] {
    display: none !important;
}

.sg.is-open {
    opacity: 1;
}

.sg-dim {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sg-dim path {
    fill: rgba(0, 0, 0, 0.5);
}

/* 소개 중인 메뉴 강조 테두리 */
.sg-spot {
    position: fixed;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.sg-spot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    animation: sgSpotPulse 2s ease-out infinite;
}

.sg-spot.is-center {
    opacity: 0;
}

.sg-spot.is-center::after {
    animation: none;
}

@keyframes sgSpotPulse {
    0% {
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-color) 55%, white);
    }
    70%,
    100% {
        box-shadow: 0 0 0 16px color-mix(in srgb, var(--theme-color) 0%, transparent);
    }
}

.sg-pop {
    position: fixed;
    left: 0;
    top: 0;
    width: min(340px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
    color: #111827;
    visibility: hidden;
    opacity: 0;
}

.sg-pop:focus {
    outline: none;
}

.sg-pop.is-visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.15s ease;
}

.sg-pop--intro {
    width: min(520px, calc(100vw - 24px));
}

.sg-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9ca3af;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.sg-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.sg-step {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 20px 16px;
}

.sg-step[hidden] {
    display: none;
}

.sg-count {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-color);
    font-variant-numeric: tabular-nums;
}

.sg-title {
    margin: 0 0 6px;
    padding-right: 28px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
    word-break: keep-all;
}

.sg-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #4b5563;
    word-break: keep-all;
}

.sg-note {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--theme-color);
    word-break: keep-all;
}

.sg-sub {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}

/* 첫 화면 */
.sg-step--intro {
    padding: 24px 24px 18px;
}

.sg-step--intro .sg-title {
    font-size: 20px;
}

.sg-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.sg-subtitle {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--theme-color);
}

.sg-list {
    margin: 0;
    padding-left: 18px;
}

.sg-list li {
    margin: 2px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

.sg-warn {
    margin: 18px 0 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f3f4f6;
    font-size: 14px;
    line-height: 1.6;
    color: #111827;
    word-break: keep-all;
}

.sg-warn strong {
    color: var(--theme-color);
}

.sg-foot {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px 16px;
    border-top: 1px solid #f3f4f6;
}

.sg-hide {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
    cursor: pointer;
}

.sg-hide input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #111827;
    cursor: pointer;
}

.sg-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.sg-btn {
    height: 36px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.sg-btn:hover {
    background: #f9fafb;
}

.sg-btn--primary {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.sg-btn--primary:hover {
    background: #1f2937;
}

.sg-btn:focus-visible,
.sg-close:focus-visible,
.sg-hide input:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 2px;
}

@media (max-width: 560px) {
    .sg-step {
        padding: 16px 16px 14px;
    }

    .sg-step--intro {
        padding: 20px 18px 14px;
    }

    .sg-step--intro .sg-title {
        font-size: 18px;
    }

    .sg-columns {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 14px;
    }

    .sg-foot {
        padding: 12px 16px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sg,
    .sg-pop.is-visible {
        transition: none;
    }

    .sg-spot::after {
        animation: none;
    }
}
