/* ===============================
   FONT
=============================== */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

/* ===============================
   RESET
=============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.2px;
    color: #222;
    background: #fff;
}

/* ===============================
   TOKENS
=============================== */
:root {
    --p500: #e5457d;
    --p400: #eb6a97;
    --p300: #f090b1;
    --p100: #fae1ea;

    --text-main: #222;
    --text-sub: #666;
    --text-muted: #888;

    --radius-lg: 32px;
    --radius-md: 22px;
}

/* =================================================
   INDEX PAGE (🔥 절대 건드리면 안 되는 구역)
================================================= */
.index-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, var(--p100) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.index-page a {
    text-decoration: none;
    color: inherit;
}

.index-page .hero {
    width: 100%;
    display: flex;
    justify-content: center;
}

.index-page .hero-content {
    max-width: 760px;
    padding: 48px 24px;
    text-align: center;
}

.index-page .panel {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 56px 48px;
    box-shadow: 0 24px 64px rgba(229, 69, 125, 0.18);
}

.index-page .title {
    font-size: 34px;
    font-weight: 800;
    color: var(--p500);
    margin-bottom: 12px;
}

.index-page .subtitle {
    font-size: 17px;
    color: var(--text-sub);
    margin-bottom: 40px;
}

/* === ROLE SELECT === */
.index-page .role-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin: 40px 0;
}

.index-page .role-card {
    background: linear-gradient(180deg, #ffffff, #fff7fa);
    border-radius: 26px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.index-page .role-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.14);
}

.index-page .role-badge {
    font-size: 34px;
    margin-bottom: 14px;
}

.index-page .role-card h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
}

.index-page .role-card p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-sub);
}

.index-page .role-card span {
    font-size: 14px;
    color: var(--text-muted);
}

.index-page .hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 28px;
}

/* =================================================
   OWNER START PAGE (🔥 중간 단계 / 작아야 함)
================================================= */
.owner-start-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #fff6f9, #ffeef4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.owner-start-page .owner-card {
    max-width: 720px;
    width: 100%;
    padding: 72px 64px;
    background: #fff;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 28px 72px rgba(229, 69, 125, 0.25);
}

.owner-start-page .title {
    font-size: 36px;
    font-weight: 800;
    color: var(--p500);
}

.owner-start-page .lead {
    font-size: 20px;
    line-height: 2;
    color: var(--text-sub);
    margin-top: 24px;
    margin-bottom: 48px;
}

/* =================================================
   OWNER STEP PAGE (🔥 메인 게임)
================================================= */
.owner-step-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #fff6f9, #ffeef4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.owner-step-page .owner-card {
    max-width: 880px;
    width: 100%;
    padding: 96px 72px;
    background: #fff;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 32px 84px rgba(229, 69, 125, 0.22);
}

.owner-step-page .title {
    font-size: 42px;
    font-weight: 800;
    color: var(--p500);
}

.owner-step-page .lead {
    font-size: 26px;
    line-height: 2.1;
    color: var(--text-sub);
    margin-top: 28px;
    margin-bottom: 56px;
}

/* === STEP CONTROL === */
.step {
    display: none;
}

.step.active {
    display: block;
}

/* === REASON LIST === */
.reason-list {
    list-style: none;
    padding: 40px 44px;
    margin: 0 auto 48px;
    max-width: 680px;
    background: linear-gradient(180deg, #fff7fa, #fff2f6);
    border-radius: 28px;
    text-align: left;
}

.reason-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 22px;
    line-height: 2.1;
}

.reason-list li+li {
    margin-top: 14px;
}

.reason-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--p500);
    margin-top: 0.95em;
    flex-shrink: 0;
}

/* === NOTICE === */
.notice {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 56px;
}

/* =================================================
   MOCKUP STEPS (🔥 문제의 핵심 해결)
================================================= */
.mockup-steps {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin: 48px 0;
}

.mockup-step {
    width: 320px;
    text-align: center;
    flex-shrink: 0;
    overflow: hidden;
    /* 🔥 폭주 차단 */
}

.mockup-step img {
    width: 100%;
    max-height: 520px;
    /* 🔥 핵심 */
    object-fit: contain;
    /* 🔥 비율 유지 */
    border-radius: 26px;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.16);
    display: block;
}

.step-badge {
    display: inline-block;
    background: var(--p100);
    color: var(--p500);
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.step-text {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* =================================================
   BUTTONS
================================================= */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.owner-start-page .cta,
.owner-step-page .cta {
    height: 84px;
    border-radius: var(--radius-md);
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    text-decoration: none;
}

.cta.primary {
    background: var(--p500);
    color: #fff;
}

.cta.secondary {
    background: #fff;
    color: var(--p500);
    border: 2px solid var(--p300);
}

/* =================================================
   MOBILE
================================================= */
@media (max-width: 768px) {
    .index-page .role-select {
        grid-template-columns: 1fr;
    }

    .owner-start-page .owner-card,
    .owner-step-page .owner-card {
        padding: 64px 24px;
    }

    .mockup-steps {
        flex-wrap: wrap;
    }

    .mockup-step img {
        max-height: 420px;
    }
}

/* ===============================
   STEP 7 FINAL
=============================== */

.final-notice {
    font-size: 20px;
    font-weight: 600;
    color: #d6456f;
    margin: 40px 0 56px;
}

.final-complete-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--p500);
    margin-bottom: 24px;
}

.final-complete-desc {
    font-size: 24px;
    line-height: 1.6;
    color: var(--text-sub);
    margin-bottom: 40px;
}

.teacher-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--p500);
    text-decoration: underline;
}

/* ===============================
   TEACHER START SPACING FIX
=============================== */

.owner-start-page .button-group {
    margin-bottom: 28px;
}

.owner-start-page .notice {
    margin-top: 20px;
}

/* STEP 설명 문구 한글 깨짐 방지 */
.step-desc,
.step-desc li {
    letter-spacing: -0.01em;
    word-break: keep-all;
    white-space: normal;
    line-height: 1.6;
}

.step {
    display: none;
}

.step.active {
    display: block;
}