/* Container Layout: Center */
.intro-flex {
    display: flex;
    justify-content: center;
    align-items: center; /* vertically center */
    gap: clamp(16px, 3vw, 40px);
    margin: 16px 0;
}

/* Set the Size of Image */
.bear-img {
    height: clamp(160px, 36dvh, 320px);
    width: auto;
    display: block;
}

/* Right Side Bubble */
.speech-bubble {
    background: #ffffff;
    border: 4px solid #f0f0f0;
    border-radius: 40px;
    padding: clamp(16px, 2vw, 30px) clamp(18px, 2.5vw, 40px);
    position: relative;
    max-width: 450px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: #334e68;
    font-weight: bold;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.character-box { flex: 0 1 38%; min-width: 0; }
.speech-box { flex: 0 1 450px; min-width: 0; }
.speech-bubble p { margin: 0.6em 0; }
.home-title { font-size: clamp(1.6rem, 3vw, 2.5rem); margin-top: 0; }

/* Triangle of Left Side of Bubble */
.speech-bubble::before {
    content: '';
    position: absolute;
    left: -20px; /* move to left side */
    top: 50%;
    transform: translateY(-50%);
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 20px solid #f0f0f0; /* keep the color same */
}

@media (max-width: 767px) {
    .character-box, .speech-box { flex: none; }
    .intro-flex {
        flex-direction: column;
        gap: 16px;
        margin: 10px 0;
    }

    .bear-img {
        height: min(34vh, 240px);
        max-width: 82vw;
        object-fit: contain;
    }

    .speech-bubble {
        max-width: 100%;
        border-radius: 20px;
        padding: 18px 20px;
        font-size: 1.05rem;
        line-height: 1.6;
    }

    .speech-bubble::before {
        display: none;
    }
}
