body {
    margin: 0;
    background: #f4f1ea;
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    display: flex;
    justify-content: center;
}

/* 📱 모바일 고정 레이아웃 */
.app {
    position: relative;
    width: 390px;
    min-height: 100vh;
    display: flex;
}

/* 🔖 상단 브랜드 바 */
.brand-header {
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 15px;
    color: #9aa0a6; /* 은은한 그레이 */
    letter-spacing: 1px;
    font-weight: 500;
    text-align: center;
    padding-bottom: 20px;  /* 이 값을 조절 */
    padding-left: 30px;  /* 이 값을 조절 */
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;  /* 👈 이 줄 추가! */
    z-index: 1;  /* 👈 이것도 추가 */
}

.brand-logo {
    height: 80px;  /* 필요에 따라 조절 */
    width: auto;   /* 비율 유지 */
}

/* 📖 다이어리 */
.diary {    
    width: 340px;
    background: #fffdf6;
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(0,0,0,0.08);
    padding: 20px;
    margin: 20px 0;
    min-height: 85vh;
    margin-top: 80px;  /* 필요에 따라 조절 */
}

.page h2 {
    margin-top: 0;
    font-size: 22px;
    margin-bottom: 20px;
}

/* 📌 페이지 줄 간격 */
.home-item {
    position: relative;
    padding: 14px 0;   /* 🔥 이 높이와 탭 높이를 맞춤 */
    font-size: 20px;
    cursor: pointer;
}

.home-item {
    padding: 10px 12px;
    margin: 6px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.home-item:active {
    transform: scale(0.97);
    filter: brightness(0.95);
}

.home-item .line {
    display: block;
    height: 1px;
    background: #ddd;
    margin-top: 8px;
}

.home-item.tab1:hover { background-color: #ffd9de; }
.home-item.tab2:hover { background-color: #ffe7c7; }
.home-item.tab3:hover { background-color: #fff6b7; }
.home-item.tab4:hover { background-color: #dff5d8; }
.home-item.tab5:hover { background-color: #d6ecff; }
.home-item.tab6:hover { background-color: #e4dbff; }
.home-item.tab7:hover { background-color: #ffdff3; }
.home-item.tab8:hover { background-color: #d7f7f3; }
.home-item.tab9:hover { background-color: #f0e2d0; }

/* 📚 우측 탭 */
.tabs {
    width: 50px;
    display: flex;
    flex-direction: column;
    margin-top: 100px; /* 🔥 제목 + 첫 줄 위치와 정렬 */
    margin-left: 5px;
}

.tabs a {
    text-decoration: none;
}

.tabs button {
    width: 100%;
    height: 50px;   /* 🔥 home-item 한 줄 높이와 맞춤 */
    margin-bottom: 6px;
    border: none;
    border-radius: 0 12px 12px 0;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #444;
    font-size: 16px;
}

/* 🌈 파스텔 탭 컬러 */
#tab1 { background: #ffd9de; }   /* 연핑크 */
#tab2 { background: #ffe7c7; }   /* 살구 */
#tab3 { background: #fff6b7; }   /* 연노랑 */
#tab4 { background: #dff5d8; }   /* 연연두 */
#homeTab { background: #d6ecff; }/* 하늘 */
#tab6 { background: #e4dbff; }   /* 연보라 */
#tab7 { background: #ffdff3; }   /* 벚꽃 */
#tab8 { background: #d7f7f3; }   /* 민트 */
#tab9 { background: #f0e2d0; }   /* 베이지 */

/* 호버 */
.tabs button:hover {
    filter: brightness(0.96);
    transform: translateX(-4px);
}

/* ⭐ 현재 페이지 탭 */
.tabs button.active {
    background: #ffffff !important;
    transform: translateX(-8px);
    box-shadow: -3px 3px 8px rgba(0,0,0,0.12);
    z-index: 2;
}

/* 히라가나 페이지 전용 */
.hira-page h2 {
    text-align: center;
    margin-bottom: 10px;
}

.top-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.top-links a {
    text-decoration: none;
    color: #555;
    border: 1px solid #ddd;
    padding: 4px 10px;
    border-radius: 6px;
    background: #fff;
}

.top-links a.active {
    background: #FFD1DC;
    font-weight: bold;
}

.big-box {
    width: 220px;
    height: 140px;
    margin: 10px auto 15px;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    background: #fff;
    font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
    font-weight: 700;
}

.kana-table {
    margin: 0 auto 20px;
    border-collapse: collapse;
}

.kana-table td {
    border: 1px solid #ccc;
    width: 48px;
    height: 42px;
    font-size: 22px;
    cursor: pointer;
    font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
    font-weight: 600;   /* 🔥 글자 두껍게 */
    align-items: center;
    /*display: flex;*/
    /*justify-content: center;  /* 가로 중앙 */
    /*align-items: center;      /* 세로 중앙 */
    text-align: center;
}

.kana-table td.active {
    background: #FFD1DC;
}

/* 클릭 불가 칸 (비활성 글자) */
.kana-table td.empty {
    color: #cfcfcf;          /* 연한 회색 글자 */
    background-color: #f9f9f9; /* 살짝 흐린 배경 */
    cursor: default;         /* 마우스 포인터 기본값 */
    font-weight: 400;        /* 두께도 살짝 얇게 */
}

/* 클릭 가능한 칸 */
.kana-table td:not(.empty) {
    color: #222;
    font-weight: 600;
    transition: all 0.15s ease;
}

.kana-table td:not(.empty):hover {
    background-color: #eef7ff;
    transform: scale(1.08);
}

.voice-select {
    margin-top: 20px;
    text-align: center;
}

.voice-select button {
    margin: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    border: none;
    background: #e0e0e0;
    cursor: pointer;
    font-size: 14px;
}

.voice-select button.active {
    background: #a5d8ff;
    font-weight: bold;
}

.game-intro {
    font-size: 20px;
    line-height: 1.6;
    margin: 20px 10px;
    text-align: center;
}

.game-start {
    text-align: center;
    margin: 25px 0 10px;
}

.start-btn {
    width: 180px;
    max-width: 80%;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.start-btn:active {
    transform: scale(0.96);
}

.game-note {
    font-size: 18px;
    color: #888;
    text-align: center;
    margin-top: 8px;
}
.intro-text {
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
}

.feature-box {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.8;
}

.cta-area {
    text-align: center;
    margin: 25px 0;
}

.main-btn {
    background: #6c8cff;
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.main-btn:hover {
    background: #4f6fff;
}

.sub-text {
    font-size: 13px;
    color: #666;
    text-align: center;
    line-height: 1.6;
}
