/* 메인 랜딩 - 토디 체험하기
   - 버튼 줄: 검색영역 아래 여백에 absolute 배치(본문 높이를 밀지 않음)
   - 플레이어: 기능소개 카드와 같은 자리(재생 중에는 카드를 숨기고 이 상자를 보임)
   - PC 전용(기능소개 카드와 같이 1300px 미만은 숨김). 휴대폰용은 추후 별도 제작 */

.tody-tour-menu {
    padding: 0; /* 전역 section 여백 제거 */
    position: absolute;
    left: 50%;
    bottom: 96px;
    width: 800px;
    transform: translateX(-50%);
    text-align: left;
    z-index: 4;
}
.tody-tour-menu .tt-menu-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.tody-tour-menu .tt-install-btn {
    padding: 5px 12px;
    border-radius: 4px;
    background: #5f2b63;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: background .15s;
}
.tody-tour-menu .tt-install-btn:hover {
    background: #4a2150;
    color: #fff;
}
.tody-tour-menu .tt-menu-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}
.tody-tour-menu .tt-menu-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tody-tour-menu .tt-menu-btn {
    padding: 7px 14px;
    border: 1px solid #e5d48a;
    border-radius: 4px;
    background: #fdf3c4;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.tody-tour-menu .tt-menu-btn:hover {
    background: #fbe89b;
}
.tody-tour-menu .tt-menu-btn.active {
    border-color: #5f2b63;
    background: #5f2b63;
    color: #fff;
}

/* 플레이어 상자: left/width 는 .main-feature-intro 와 같은 계산식 */
.tody-tour-box {
    padding: 0;
    position: absolute;
    top: 50%;
    left: calc(50% + 470px);
    transform: translateY(-50%);
    width: calc(50% - 486px);
    max-width: 440px;
    z-index: 6;
    display: none;
    color: #1f2937;
}
.tody-tour-box.open {
    display: block;
}
.tody-tour-box .tt-panel {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.tody-tour-box .tt-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #eef2f7;
}
.tody-tour-box .tt-head-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    color: #5f2b63;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tody-tour-box .tt-head button {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    line-height: 1;
    padding: 4px;
    cursor: pointer;
}
.tody-tour-box .tt-head button:hover {
    color: #1f2937;
}

.tody-tour-box .tt-head .tt-voice {
    flex: 0 0 auto;
    height: 24px;
    padding: 0 7px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #334155;
    font-size: 12px;
}
.tody-tour-box .tt-head .tt-voice.on {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}
.tody-tour-box .tt-head .tt-speed {
    flex: 0 0 auto;
    height: 24px;
    padding: 0 2px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    cursor: pointer;
}

/* 빨강 영역: PC 화면 */
.tody-tour-box .tt-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f1f5f9;
}
.tody-tour-box .tt-canvas {
    position: absolute;
    inset: 0;
    transform-origin: 0 0;
    transition: transform calc(.9s / var(--tt-speed, 1)) ease;
}
.tody-tour-box .tt-canvas.no-anim {
    transition: none;
}
.tody-tour-box .tt-canvas img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}
.tody-tour-box .tt-hot {
    position: absolute;
    border: 2px solid #ef4444;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
    animation: ttPulse 1.4s ease-in-out infinite;
}
.tody-tour-box .tt-hot.show {
    opacity: 1;
}
@keyframes ttPulse {
    0%, 100% { outline: 0 solid rgba(239, 68, 68, .55); }
    50% { outline: 5px solid rgba(239, 68, 68, .18); }
}
/* 가짜 마우스 커서: 크기는 화면 폭 기준(%)이라 크게 보기에서도 비율 유지 */
.tody-tour-box .tt-cursor {
    position: absolute;
    width: 2%;
    pointer-events: none;
    opacity: 0;
    transition: left calc(.8s / var(--tt-speed, 1)) ease, top calc(.8s / var(--tt-speed, 1)) ease, opacity .25s;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4));
}
.tody-tour-box .tt-cursor.show {
    opacity: 1;
}
.tody-tour-box .tt-cursor svg {
    display: block;
    width: 100%;
    height: auto;
}
.tody-tour-box .tt-ripple {
    position: absolute;
    width: 5%;
    aspect-ratio: 1;
    margin-left: -2.5%;
    border-radius: 50%;
    background: rgba(239, 68, 68, .45);
    pointer-events: none;
    transform: translateY(-50%) scale(.2);
    opacity: 0;
}
.tody-tour-box .tt-ripple.play {
    animation: ttRipple calc(.7s / var(--tt-speed, 1)) ease-out;
}
.tody-tour-box .tt-ripple.right {
    background: rgba(37, 99, 235, .45);
}
@keyframes ttRipple {
    0% { transform: translateY(-50%) scale(.2); opacity: 1; }
    100% { transform: translateY(-50%) scale(1.5); opacity: 0; }
}

/* 파랑 영역: 지금 해야 할 동작 */
.tody-tour-box .tt-caption {
    min-height: 118px;
    padding: 10px 14px;
    border-top: 3px solid #2563eb;
    background: #eff6ff;
}
.tody-tour-box .tt-chapter {
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
}
.tody-tour-box .tt-step-title {
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}
.tody-tour-box .tt-step-text {
    font-size: 13.5px;
    line-height: 1.55;
    color: #334155;
    word-break: keep-all;
}
.tody-tour-box .tt-done {
    margin-top: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #2563eb;
}
.tody-tour-box .tt-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-top: 1px solid #dbeafe;
    background: #fff;
}
.tody-tour-box .tt-controls button {
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    cursor: pointer;
}
.tody-tour-box .tt-controls button:hover:not(:disabled) {
    background: #f1f5f9;
}
.tody-tour-box .tt-controls button:disabled {
    color: #cbd5e1;
    cursor: default;
}
/* 누르기 쉽도록 막대 칸은 18px, 보이는 선은 6px */
.tody-tour-box .tt-progress {
    position: relative;
    flex: 1;
    height: 18px;
    cursor: pointer;
    touch-action: none;
}
.tody-tour-box .tt-progress::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 6px;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
}
.tody-tour-box .tt-progress > i {
    position: absolute;
    left: 0;
    top: 6px;
    height: 6px;
    border-radius: 3px;
    background: #2563eb;
    transition: width .15s;
}
.tody-tour-box .tt-progress > i::after {
    content: "";
    position: absolute;
    right: -6px;
    top: -3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 2px #fff;
}
.tody-tour-box .tt-count {
    margin-left: 8px;
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}
.tody-tour-box .tt-empty {
    padding: 48px 20px;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
}

/* 크게 보기: 화면 가운데 띄우고 PC 화면 전체를 그대로 보여 준다 */
.tody-tour-backdrop {
    padding: 0;
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    background: rgba(15, 23, 42, .6);
}
.tody-tour-backdrop.open {
    display: block;
}
.tody-tour-box.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(1120px, calc((100vh - 230px) * var(--tt-ratio, 1.46)), 92vw);
    max-width: none;
    z-index: 2001;
}
.tody-tour-box.expanded .tt-caption {
    min-height: 92px;
}
.tody-tour-box.expanded .tt-step-text {
    font-size: 15px;
}

/* 992~1299px: 옆 공간이 없어 숨김. 991px 이하는 아래 휴대폰 화면 */
@media (min-width: 992px) and (max-width: 1299px) {
    .tody-tour-menu,
    .tody-tour-box {
        display: none !important;
    }
}

/* 휴대폰: tody_tour.js 의 PHONE_MQ 와 같은 기준 */
@media (max-width: 991px) {
    .tody-tour-menu {
        left: 16px;
        right: 16px;
        bottom: 12px;
        width: auto;
        transform: none;
    }
    .tody-tour-menu .tt-menu-head {
        margin-bottom: 6px;
    }
    .tody-tour-menu .tt-install-btn {
        display: none;
    }
    .tody-tour-menu .tt-menu-list {
        gap: 6px;
    }
    .tody-tour-menu .tt-menu-btn {
        padding: 5px 9px;
        font-size: 12.5px;
    }

    /* 좁은 폰에서 3줄이 되면 검색 태그와 겹친다 */
    @media (max-width: 479px) {
        .tody-tour-menu {
            bottom: 4px;
        }
        .tody-tour-menu .tt-btn-suffix {
            display: none;
        }
    }

    /* 준비 중 안내: 가운데 작은 창 */
    .tody-tour-box {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: min(320px, 90vw);
        max-width: none;
        z-index: 2001;
    }
    /* 재생: 전체 화면 */
    .tody-tour-box.expanded {
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        height: 100vh;
        height: 100dvh;
    }
    .tody-tour-box.expanded .tt-panel {
        display: flex;
        flex-direction: column;
        height: 100%;
        border: 0;
        border-radius: 0;
    }
    .tody-tour-box.expanded .tt-body {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        min-height: 0;
        background: #1e293b;
    }
    .tody-tour-box.expanded .tt-stage {
        flex: 1 1 0;
        align-self: center;
        width: auto; /* 높이에 맞춰 이미지 비율로 폭을 정한다 */
        min-height: 0;
        max-width: 100%;
    }
    .tody-tour-box.expanded .tt-caption {
        flex: 0 0 auto;
        height: 128px;
        min-height: 0;
        overflow-y: auto;
    }
    .tody-tour-box .tt-expand {
        display: none;
    }
    .tody-tour-box.expanded .tt-controls {
        flex: 0 0 auto;
        padding-bottom: calc(6px + env(safe-area-inset-bottom));
    }
    /* 마우스 화살표 대신 손가락 표시 */
    .tody-tour-box .tt-cursor {
        width: 9%;
        aspect-ratio: 1;
        border: 2px solid #fff;
        border-radius: 50%;
        background: rgba(239, 68, 68, .55);
        transform: translate(-50%, -50%);
    }
    .tody-tour-box .tt-cursor svg {
        display: none;
    }
    .tody-tour-box .tt-ripple {
        width: 18%;
        margin-left: -9%;
    }
}
@media (prefers-reduced-motion: reduce) {
    .tody-tour-box .tt-canvas,
    .tody-tour-box .tt-cursor {
        transition: none;
    }
    .tody-tour-box .tt-hot {
        animation: none;
    }
}
