* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #fff;
    color: #1f1f1f;
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
}

#tutorial-root {
    display: grid;
    min-height: inherit;
    place-items: center;
}

.tutorial-step {
    width: min(480px, calc(100vw - 48px));
    text-align: center;
    animation: tutorial-step-in 480ms ease-out both;
}

.tutorial-step--next {
    width: min(560px, calc(100vw - 48px));
}

.tutorial-hand-image {
    display: block;
    width: 52px;
    height: 52px;
    margin: 0 auto 26px;
}

.tutorial-copy {
    margin: 0;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.65;
}

/* This uses the same hand-sign SVG markup as the editable card on the main page. */
.tutorial-morph-preview {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto 28px;
}

.tutorial-morph-preview .word-container {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    padding: calc(var(--glyph-size, 56px) * 0.17) calc(var(--glyph-size, 56px) * 0.21);
    background: #00ff19;
}

.tutorial-morph-preview .glyph-slot {
    position: relative;
    display: block;
    width: var(--glyph-size, 56px);
    height: var(--glyph-size, 56px);
    flex: 0 0 var(--glyph-size, 56px);
}

.tutorial-morph-preview .morph-glyph {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.tutorial-progress {
    position: relative;
    display: block;
    width: 80%;
    margin: 18px auto 0;
    height: 24px;
    padding: 0;
    border: 0;
    background: linear-gradient(#f0f0f0, #f0f0f0) center / 100% 2px no-repeat;
}

.tutorial-progress__fill {
    position: absolute;
    top: 11px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #1f1f1f;
    transform: scaleX(0);
    transform-origin: left;
}

.tutorial-next-button {
    /* ── .skip-link 시각 스타일 ── */
    color: var(--ink);       /* 검정 텍스트 */
    text-decoration: none;   /* 밑줄 없음 (button엔 원래 없지만 명시) */
    background: transparent; /* 배경 제거 (원래 #1f1f1f였음) */
    border: 0;               /* 테두리 제거 */
    border-radius: 0;        /* 알약 모양 제거 */
    padding: 0;              /* 패딩 제거 */

    /* ── 유지할 것들 ── */
    margin-top: 32px;
    font: inherit;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
}


/* The previous development-only shortcut is kept in the markup for now,
   but must not appear in the tutorial flow. */
.debug-main-button {
    display: none;
}

.tutorial-step.is-transitioning {
    animation: tutorial-step-out 260ms ease-in both;
}

.debug-main-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    padding: 7px 10px;
    background: #fff;
    color: #666;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.debug-main-button:hover {
    border-color: #1f1f1f;
    color: #1f1f1f;
}

#morph-staging {
    position: fixed;
    top: -10000px;
    left: -10000px;
    width: 500px;
    height: 500px;
    visibility: hidden;
    pointer-events: none;
}

@keyframes tutorial-step-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tutorial-step-out {
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tutorial-step,
    .tutorial-step.is-transitioning {
        animation-duration: 1ms;
    }

}

@media (max-width: 560px) {
    .tutorial-step--next {
        width: min(calc(100% - 32px), 560px);
    }

    .tutorial-morph-preview .word-container {
        --glyph-size: clamp(40px, 11vw, 56px) !important;
    }
}
