/* ==========================================
   Subpage Styles - 和風 (Japanese)
   ========================================== */

/* ==========================================
   Page Hero
   ========================================== */
.page-hero {
    padding: 100px 0 50px;
    position: relative;
    z-index: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--indigo);
}

.page-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
}

.page-hero-text {
    flex: 1;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 14px;
    animation: fadeInUp 0.5s ease 0.1s both;
    color: var(--sumi);
    letter-spacing: 0.5px;
}

.page-desc {
    font-size: 0.94rem;
    color: var(--text-secondary);
    line-height: 1.9;
    animation: fadeInUp 0.5s ease 0.2s both;
}

/* Sotsu page: tiêu đề to hơn, mô tả nhỏ hơn so với mặc định */
.page-title-lg {
    font-size: 2.6rem;
}

.page-desc-sm {
    font-size: 0.82rem;
}

/* ==========================================
   Zodiac Wheel
   ========================================== */
.zodiac-wheel {
    flex-shrink: 0;
    width: 280px;
    height: 280px;
    position: relative;
    animation: fadeInUp 0.5s ease 0.3s both;
}

.wheel-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: default;
    transition: var(--transition);
}

.wheel-item:hover {
    transform: scale(1.15) !important;
}

.wheel-emoji {
    font-size: 1.6rem;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.wheel-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
}

.wheel-active .wheel-emoji {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

.wheel-active .wheel-label {
    color: var(--sakura-deep);
    font-weight: 700;
}

.wheel-center {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: var(--bg-card);
    border: 2px solid var(--sakura-dark);
    border-radius: 50%;
    width: 110px;
    height: 110px;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.wheel-center-year {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.wheel-center-eto {
    font-size: 1.8rem;
}

.wheel-center-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--sakura-deep);
}

/* ==========================================
   Zodiac Legend Grid
   ========================================== */
.zodiac-legend-section {
    padding: 0 0 30px;
    position: relative;
    z-index: 1;
}

.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.zodiac-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: default;
}

.zodiac-card:hover {
    border-color: var(--sakura-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.zodiac-active {
    border-color: var(--sakura-deep);
    background: #FFF5F8;
    box-shadow: 0 2px 12px rgba(200, 90, 138, 0.15);
}

.zodiac-emoji {
    font-size: 1.6rem;
}

.zodiac-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.zodiac-animal {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ==========================================
   Eto Table (New - matches school table pattern)
   ========================================== */

.eto-table-new {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.eto-table-new th {
    position: sticky;
    top: 0;
    z-index: 102;
    background-color: #2b437e !important;
    color: #ffffff !important;
    padding: 12px 10px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
    border-bottom: 1px solid #1a252f;
}

.eto-table-new td {
    padding: 9px 8px;
    font-size: 0.84rem;
    white-space: nowrap;
    text-align: center;
}

.eto-table-new .td-eto {
    white-space: nowrap;
}

.eto-table-new .eto-badge {
    display: inline-block;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-primary);
}

.eto-table-new .age-badge.kazoe {
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================
   Eto Search Result Card
   ========================================== */
.eto-result-cards {
    max-width: 600px;
    margin: 12px auto 0; /* Ép mỏng khoảng hở với khung input trên PC */
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.eto-result-card-v2 {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.35s ease both;
}

.eto-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px; /* Ép mỏng 5 hàng kết quả trên PC */
    border-bottom: 1px solid #f0f0f0;
}

.eto-result-row:last-child {
    border-bottom: none;
}

.eto-result-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.eto-result-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.eto-result-zodiac {
    font-size: 1.15rem;
    color: var(--indigo);
}

.eto-result-age {
    font-size: 1.2rem;
    font-weight: 800;
    color: #c05c8d;
}

/* ==========================================
   Info Section
   ========================================== */
.info-section {
    padding: 30px 0 60px;
    position: relative;
    z-index: 1;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sakura), var(--indigo));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--indigo);
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 10px;
}

.info-card strong {
    color: var(--indigo);
}

.faq-card {
    margin-top: 18px;
}

.faq-item {
    padding: 12px 0;
    border-top: 1px solid var(--border-light);
}

.faq-item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.faq-item h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--indigo);
    margin-bottom: 6px;
}

.faq-item p {
    margin-bottom: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.info-item:hover {
    border-color: var(--sakura-dark);
    background: #FFF5F8;
}

.info-emoji {
    font-size: 1.2rem;
}

/* ==========================================
   School Table
   ========================================== */

/* --- Khung bọc ngoài: KHÔNG để overflow cắt sticky --- */
.school-table-wrapper {
    overflow: visible;
}

.school-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: visible !important; /* QUAN TRỌNG: visible để không triệt tiêu sticky */
    overflow-y: visible !important;
    box-shadow: var(--shadow-md);
}

.table-scroll {
    overflow-x: auto;
    max-height: 70vh; /* Khung cuộn riêng cho bảng */
    overflow-y: auto; /* Bật cuộn dọc bên trong bảng */
    -webkit-overflow-scrolling: touch;
}

.school-table {
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
}

/* --- Thiết lập chung cho tất cả th tiêu đề --- */
.school-table th {
    padding: 10px 8px;
    white-space: nowrap;
    text-align: center;
}

/* --- Áp dụng sticky + nền đặc cho MỌI ô th trong thead --- */
.school-table thead tr th {
    position: sticky !important;
    background-color: #2b437e !important; /* Màu xanh navy đồng bộ với nút */
    color: #ffffff !important;
    border-bottom: 1px solid #1a252f;
}

/* --- Hàng thứ 1: 生まれ年 và các cấp học (小学校, 中学校, 高校, 短大, 大学) --- */
.school-table thead tr:nth-child(1) th {
    top: 0;       /* Dính sát đỉnh vùng cuộn */
    z-index: 102; /* Lớp trên cùng */
    font-size: 16px;
    font-weight: bold;
    padding: 11px 8px;
}

/* --- Hàng thứ 2: 入学 / 卒業 --- */
.school-table thead tr:nth-child(2) th {
    top: 42px;    /* Khớp chiều cao thực tế của hàng 1 để nối liền mạch */
    z-index: 101; /* Ngay dưới hàng 1 */
    font-size: 15px;
    font-weight: 600;
    padding: 8px 6px;
}

/* --- Ô dữ liệu tbody --- */
.school-table td {
    padding: 9px 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    text-align: center;
}

.sticky-col-priority {
    /* Disabled sticky behavior for priority columns.
       Generator/JS no longer assign these classes; keep styling harmless
       so existing static fragments don't freeze horizontal scrolling. */
    position: static; /* allow normal flow and horizontal scroll */
    z-index: auto;
    background: transparent;
    box-shadow: none;
}

.sticky-col-priority-1 { left: 105px; }
.sticky-col-priority-2 { left: 195px; }
.sticky-col-priority-3 { left: 285px; }
.sticky-col-priority-4 { left: 375px; }

/* --- Cột dính bên trái (生まれ年) cho cuộn ngang --- */
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 3;
    background: white !important;
    min-width: 105px;
    border-right: 2px solid var(--border-light);
}

/* Cột dính trong thead phải có z-index cao hơn để nổi ở góc trái-trên */
thead .sticky-col {
    z-index: 103 !important; /* Cao nhất: vừa dính trái vừa dính trên */
    background-color: #2c3e50 !important;
    color: #ffffff !important;
}

.td-school { font-weight: 500; }

.school-year {
    font-weight: 600;
    color: var(--text-primary);
}

.school-table small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ==========================================
   Sotsu Hero & Search
   ========================================== */
.text-center-hero {
    text-align: center;
}

.text-center-hero .page-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.text-center-hero .page-hero-text {
    width: 100%;
}

.text-center-hero .page-title,
.text-center-hero .page-desc {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.sotsu-hero-visual {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 30px;
    animation: fadeInUp 0.5s ease 0.4s both;
}

.sotsu-hero-card {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 650px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    text-align: left;
}

.sotsu-hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sakura-deep), var(--indigo), var(--matcha));
}

.sotsu-search-row {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: 100%;
    margin-bottom: 12px;
}

.sotsu-hero-notes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
}

/* ==========================================
   School Search Result Cards (V2)
   ========================================== */
.sotsu-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
    margin: 24px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.sotsu-card-v2 {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.35s ease both;
}

.sotsu-card-v2-header {
    background: transparent;
    color: #c05c8d;
    font-weight: bold;
    font-size: 17px;
    padding: 6px 12px;
    text-align: center;
    border-bottom: 1px solid #eeeeee;
}

.sotsu-card-v2-body {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 8px 12px;
}

.sotsu-card-v2-row {
    display: flex;
    align-items: baseline;
    white-space: nowrap;
}

.sotsu-card-v2-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.sotsu-card-v2-year {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--indigo);
    margin-right: 4px;
}

.sotsu-card-v2-wareki {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sotsu-result-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #fef8fb 0%, #f2f7ff 100%);
    border: 1px solid #f2d5e0;
}

.sotsu-summary-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sotsu-summary-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--indigo);
}

.sotsu-summary-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.sotsu-summary-note {
    flex: 1;
    min-width: 220px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Smart Navigation Buttons */
.sotsu-nav-btns {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 20px;
}

.sotsu-nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

/* ==========================================
   Table Search Box
   ========================================== */
.table-search-box {
    display: flex;
    align-items: center;
    max-width: 550px;
    margin: 24px auto 0;
    background: white;
    border: 1px solid var(--border-medium);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.table-search-box:focus-within {
    border-color: var(--indigo-pale);
    box-shadow: 0 0 0 3px rgba(38, 68, 120, 0.08);
}

.table-search-input-rounded {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    outline: none;
    background: transparent;
}

.table-search-btn-rounded {
    background: var(--indigo);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.table-search-btn-rounded:hover {
    background: var(--indigo-light);
    transform: scale(1.05);
}

/* Table Row Highlight */
.row-flash-yellow td {
    animation: flashYellow 2.5s ease;
}

@keyframes flashYellow {
    0% { background-color: transparent; }
    20% { background-color: #FFF9C4; }
    80% { background-color: #FFF9C4; }
    100% { background-color: transparent; }
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1024px) {
    .page-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .zodiac-wheel { width: 240px; height: 240px; }
    .zodiac-grid { grid-template-columns: repeat(4, 1fr); }
    .info-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .page-title { font-size: 1.6rem; }
    .page-title-lg { font-size: 1.9rem; }
    .page-desc-sm { font-size: 0.78rem; }
    .zodiac-grid { grid-template-columns: repeat(3, 1fr); }
    .info-grid { grid-template-columns: repeat(2, 1fr); }
    
    /* === TỐI ƯU KÉP KENSA BLOCK (ETO / SOTSU) === */
    /* 1. Ép chặt ruột bên trong */
    .sotsu-hero-card .widget-title { margin-bottom: 8px; }
    .sotsu-hero-card .widget-label { margin-bottom: 4px; }
    .sotsu-hero-card .sotsu-search-row { margin-bottom: 6px; }
    .eto-result-cards { margin-top: 8px; padding-top: 12px; } /* Khử triệt để khoảng lỏng lẻo khung hồng */
    .eto-result-row { padding: 4px 12px; } /* Ép mỏng sát rạt 5 hàng kết quả */
    .sotsu-nav-btns { flex-direction: column; gap: 8px; margin-top: 12px; }
    .sotsu-nav-btn { padding: 8px 12px; font-size: 0.9rem; } /* Ép mỏng nút bấm tối đa */
    
    /* 2. Chừa đất AdSense phong thủy bên ngoài */
    .sotsu-hero-card { margin-bottom: 45px; }
    
    .sotsu-cards-container { gap: 6px; margin-bottom: 8px; }
    .sotsu-card-v2 { margin-bottom: 0px; }
    .sotsu-card-v2-body { flex-direction: column; gap: 2px; padding: 6px 0; }
    .sotsu-card-v2-row { justify-content: center; width: 100%; }
    .sotsu-result-summary { flex-direction: column; align-items: flex-start; }
    .sotsu-summary-note { min-width: 0; }
    .info-grid { grid-template-columns: 1fr; }
    .school-table { min-width: 760px; }
    .school-table td, .school-table th { padding: 7px 5px; }
    .sotsu-card-v2-header { padding: 4px 0; font-size: 17px; }
    .sotsu-card-v2-year { font-size: 15px; margin-right: 4px; }
    .sotsu-card-v2-label { font-size: 14px; }
    .sotsu-card-v2-wareki { font-size: 13px; }

    .zodiac-wheel { width: 210px; height: 210px; }
    .wheel-emoji { font-size: 1.2rem; }
    .wheel-active .wheel-emoji { font-size: 1.5rem; }
    .wheel-center { width: 85px; height: 85px; }
    .wheel-center-eto { font-size: 1.4rem; }
    .wheel-center-year { font-size: 0.68rem; }
}

@media (max-width: 480px) {
    .page-hero { padding-top: 88px; padding-bottom: 36px; }
    .zodiac-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid { grid-template-columns: 1fr; }
    .info-card { padding: 20px; }
}

/* ==========================================
   Year Template Minimalism Styles
   ========================================== */
/* 1. Summary Card */
.summary-card {
    display: flex;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 16px 20px;
    margin: 16px auto;
    justify-content: space-between;
    border: 1px solid #eee;
}
.summary-item {
    flex: 1;
    min-width: 150px;
    text-align: center;
    border-right: 1px solid #eee;
    padding: 10px;
}
.summary-item:last-child {
    border-right: none;
}
.summary-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}
.summary-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}
.summary-item.highlight .summary-value {
    color: #e53935;
}
@media (max-width: 600px) {
    .summary-item {
        flex: 1 1 45%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    .summary-item:nth-child(3), .summary-item:nth-child(4) {
        border-bottom: none;
    }
}

/* 2. Minimal Table */
.minimal-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.95rem;
}
.minimal-table th, .minimal-table td {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    text-align: center;
}
.minimal-table th {
    background: #2b437e;
    color: #ffffff;
    font-weight: 600;
}
.minimal-table td {
    white-space: pre-wrap;
    word-break: keep-all;
}
.minimal-table td small {
    color: #777;
    margin-left: 4px;
}

@media (max-width: 600px) {
    .minimal-table td small {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }
}

/* 3. Age Minimal Table */
.age-minimal-table tbody tr:hover {
    background-color: #f0f7ff;
}
.current-year-row {
    background-color: #fffde7 !important;
}

/* 4. Yakudoshi Tables */
.yakudoshi-tables-wrapper {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.yaku-col-table {
    flex: 1;
    min-width: 300px;
}
.yaku-col-table h3 {
    font-size: 1.1rem;
    margin-bottom: 14px;
    color: #333;
    text-align: center;
}
.taiyaku-row {
    background-color: #ffebee !important;
    color: #c62828;
}
.taiyaku-badge-text {
    font-size: 0.8rem;
    background: #c62828;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
}

/* 5. Celeb Grid */
.celeb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}
@media (max-width: 768px) {
    .celeb-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.celeb-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    text-align: center;
}
.celeb-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #2c3e50;
    margin-bottom: 4px;
}
.celeb-job {
    font-size: 0.85rem;
    color: #888;
}

/* 6. Event List */
.event-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid #e0e0e0;
    margin-left: 10px;
}
.event-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 20px;
    line-height: 1.6;
    color: #444;
}
.event-list li::before {
    content: "";
    position: absolute;
    left: -25px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #264478;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #264478;
}

/* 7. FAQ Highlight */
.faq-highlight {
    color: #264478;
    font-weight: 700;
    font-size: 1.1em;
}

/* Print */
@media print {
    .page-hero, .zodiac-legend-section, .zodiac-wheel,
    .quick-search, .notes-section, .info-section {
        display: none !important;
    }

    .school-table-container, .table-container {
        background: white;
        box-shadow: none;
    }

}

/* ==========================================================
   YEAR TEMPLATE STYLES (Trang Tra Cứu Năm) - Đã chuẩn hóa
   ========================================================== */

/* 0. TIÊU ĐỀ & MÔ TẢ */
.yt-page .single-line-title {
    font-size: 2rem;
    letter-spacing: 0.02em;
}
@media (max-width: 600px) {
    .yt-page .single-line-title {
        font-size: 1.4rem;
    }
}
.yt-page .page-desc {
    font-size: 0.85rem;
    color: #999;
    margin-top: 6px;
    line-height: 1.5;
}
@media (max-width: 600px) {
    .yt-page .page-desc {
        font-size: 0.78rem;
    }
}
.yt-page .section-title {
    background: #264478; 
    padding: 8px 16px;
    border-left: none;
    margin-top: 64px;
    margin-bottom: 8px;
    justify-content: flex-start;
    border-radius: 4px;
    font-size: 1.4rem;
    color: #ffffff; 
    font-weight: 700;
}

.yt-page .section-title .title-icon {
    display: none;
}

.yt-page .section-desc {
    font-size: 14.5px;
    color: #555;
    margin-top: 0;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* 1. KHỐI THÔNG TIN CƠ BẢN (SUMMARY CARD) */
.yt-page .page-hero {
    padding-bottom: 10px;
}
.yt-page .summary-card {
    padding: 12px 16px;
    margin: 16px auto 10px;
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    gap: 0;
    border: 1px solid #d0d7e3;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
}
.yt-page .summary-item {
    flex: 1 1 0%;
    min-width: 0;
    padding: 6px 10px;
    border-bottom: none;
    border-right: 1px solid #eee;
    text-align: center;
    overflow: hidden;
}
.yt-page .summary-item:last-child {
    border-right: none;
}
.yt-page .summary-label {
    font-size: 0.72rem;
    margin-bottom: 3px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.yt-page .summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
}
.yt-page .summary-item.highlight .summary-value,
.yt-page .summary-item.highlight .summary-value span {
    color: #333;
    font-weight: 700;
}
@media (max-width: 600px) {
    .yt-page .summary-card { padding: 8px 6px; }
    .yt-page .summary-item { padding: 4px 5px; }
    .yt-page .summary-label { font-size: 0.6rem; }
    .yt-page .summary-value,
    .yt-page .summary-item.highlight .summary-value,
    .yt-page .summary-item.highlight .summary-value span {
        font-size: 1.05rem;
    }
}

/* Micro-copy dẫn dắt */
.yt-page .nav-hint {
    text-align: center;
    font-size: 13px;
    color: #777;
    margin-top: 5px;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}
@media (max-width: 600px) {
    .yt-page .nav-hint {
        font-size: 12px;
        margin: 8px 0 4px;
    }
}

/* 2. CỤM NÚT ĐIỀU HƯỚNG NHANH */
.yt-page .page-nav-wrapper {
    margin-top: 0;
    margin-bottom: 28px;
}
.yt-page .page-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px;
    max-width: 750px;
    margin: 0 auto;
}
.yt-page .page-nav a {
    flex: 0 1 auto;
    text-align: center;
    padding: 6px 12px;
    background: #fff;
    color: #264478;
    border-radius: 5px; 
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid #b0c0de;
    transition: all 0.25s ease;
    white-space: nowrap;
    line-height: 1.3;
}
.yt-page .page-nav a:hover {
    background: #264478;
    color: #fff;
    border-color: #264478;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(38, 68, 120, 0.18);
}
@media (max-width: 768px) {
    .yt-page .page-nav {
        display: grid;
        grid-template-columns: repeat(3, auto);
        justify-content: center;
        gap: 7px;
        max-width: 92%;
        margin: 0 auto;
    }
    .yt-page .page-nav a {
        font-size: 0.8rem;
        padding: 7px 10px;
    }
}

/* 3. LAYOUT TỔNG THỂ & THẨM MỸ BẢNG */
.yt-page .container {
    max-width: 800px;
}
.yt-page .minimal-table th {
    background: #e8eaf6; 
    color: #1a2f55; 
    font-weight: 700;
    border: 1px solid #ddd;
    padding: 10px;
}
.yt-page .minimal-table td {
    border: 1px solid #ddd;
    color: #333;
    padding: 6px 8px;
    line-height: 1.3;
}
@media (max-width: 600px) {
    .yt-page .minimal-table td {
        padding: 4px 6px;
    }
    .yt-page .minimal-table td small {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }
}

/* 4. KHỐI LINK NỘI BỘ (INLINE NOTE) */
.yt-page .inline-note {
    margin: 16px 0;
    padding: 0;
    background: transparent;
    border-left: none;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
}
.yt-page .inline-note a {
    color: #264478;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(38, 68, 120, 0.3);
    text-underline-offset: 3px;
}
.yt-page .inline-note a:hover {
    color: #1a2f55;
    text-decoration-color: #1a2f55;
}

/* 5. TỐI ƯU BẢNG MỪNG THỌ */
.yt-page .longevity-name small { display: none; }
.yt-page #longevityTableBody td {
    padding: 6px 8px;
    line-height: 1.3;
}

.yt-page #faq {
    margin-bottom: 80px;
}

/* 8. YAKUDOSHI CUSTOM TABLE (P2 LAYOUT) */
.yt-page .yakudoshi-tables-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.yt-page .yaku-table-container { width: 100%; }
.yt-page .yaku-custom-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed;
}
.yt-page .yaku-custom-table th,
.yt-page .yaku-custom-table td {
    border: 1px solid #d0d7e3;
    text-align: center;
    vertical-align: middle;
    padding: 8px 10px;
}
.yt-page .yaku-custom-table th {
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
}
.yt-page .yaku-empty-corner {
    background: transparent;
    border-top-color: transparent;
    border-left-color: transparent;
}
.yt-page .yaku-gender-col {
    background: #e6f0fa;
    color: #1a2f55;
    font-weight: 700;
    width: 50px;
    font-size: 1rem;
    line-height: 1.4;
    letter-spacing: 0.1em;
}
.yt-page .yaku-hon-cell { background: #fff0f5; }
.yt-page .yaku-normal-cell { background: #fff; }
.yt-page .yaku-line1 {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
    line-height: 1.2;
}
.yt-page .yaku-line2 {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 2px;
    line-height: 1.2;
}
.yt-page .yaku-line3 {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.2;
}
.yt-page .taiyaku-badge {
    color: #e53935;
    font-size: 0.8rem;
    margin-left: 2px;
}

/* 9. TỐI ƯU BẢNG MỪNG THỌ (LONGEVITY) */
.yt-page #longevity table th:nth-child(1),
.yt-page #longevity table th:nth-child(2),
.yt-page #longevity table th:nth-child(3),
.yt-page #longevity table td:nth-child(1),
.yt-page #longevity table td:nth-child(2) {
    white-space: nowrap;
}
.yt-page .longevity-desc {
    font-size: 0.85rem;
    line-height: 1.4;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
}
@media (max-width: 600px) {
    .yt-page .yaku-gender-col {
        width: 28px;
        font-size: 0.85rem;
        padding: 4px;
        letter-spacing: 0;
    }
    .yt-page .yaku-custom-table th,
    .yt-page .yaku-custom-table td {
        font-size: 0.85rem;
        padding: 6px 2px;
    }
    .yt-page .yaku-line1 { font-size: 0.9rem; }
    .yt-page .yaku-line2, .yt-page .yaku-line3 { font-size: 0.72rem; }
    .yt-page .taiyaku-badge {
        display: block;
        font-size: 0.7rem;
        margin-left: 0;
        margin-top: 2px;
    }
    .yt-page .longevity-desc,
    .yt-page #longevity table td:nth-child(4) {
        font-size: 0.75rem;
        text-align: left;
    }
}

/* 10. TỐI ƯU DANH SÁCH SỰ KIỆN (EVENTS LIST) */
.yt-page .event-list {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
    margin-bottom: 0;
    border-left: none;
    margin-left: 0;
}
.yt-page .event-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #333;
    font-weight: 500;
}
.yt-page .event-list li::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background-color: #f48fb1;
    border-radius: 50%;
    border: none;
    box-shadow: none;
}
@media (max-width: 600px) {
    .yt-page .event-list li {
        font-size: 0.9rem;
        margin-bottom: 14px;
        padding-left: 18px;
    }
    .yt-page .event-list li::before {
        top: 8px;
        width: 5px;
        height: 5px;
    }
}

/* 11. H1 TITLE CUSTOMIZATION (DYNAMIC & RESPONSIVE) */
.yt-page .brand-text-color {
    color: #264478;
}

/* Tiêu đề 2 dòng: dòng 1 (năm sinh) chữ lớn, dòng 2 (mô tả) chữ nhỏ hơn.
   Dùng đơn vị em để tự động tỉ lệ theo font-size responsive của .single-line-title */
.yt-page .yt-title-line1 {
    display: block;
    font-size: 1em;
}
.yt-page .yt-title-line2 {
    display: block;
    font-size: 0.55em;
    font-weight: 600;
    color: #555;
    margin-top: 6px;
}

@media (max-width: 768px) {
    .yt-page .page-title.single-line-title {
        font-size: 23px;
        padding: 0 15px;
        line-height: 1.4;
    }
    .yt-page .yt-title-line2 {
        margin-top: 4px;
    }
}

/* ==========================================
   School Search Result Table (Flat Layout)
   ========================================== */
.sotsu-result-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.95rem;
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.sotsu-result-table th, .sotsu-result-table td {
    padding: 7px 16px;
    border: 1px solid #eee;
    text-align: center;
}
.sotsu-result-table th {
    background: #2b437e;
    color: #fff;
    font-weight: 600;
}
.sotsu-result-table tr {
    animation: fadeInUp 0.35s ease both;
}
.sotsu-result-table .m-school,
.sotsu-result-table .m-action {
    display: none;
}
.sotsu-result-table .m-year {
    font-weight: 700;
    color: var(--indigo);
}
.sotsu-result-table .m-wareki {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 767px) {
    .sotsu-result-table th,
    .sotsu-result-table td {
        padding: 3px 4px; /* Tối ưu padding cho khít trên mobile */
        font-size: 0.85rem;
    }
    .sotsu-result-table .m-wareki {
        display: block;
        margin-top: 0px;
    }
    
    .sotsu-nav-btns {
        margin-top: 15px;
        flex-direction: column;
        gap: 8px;
    }
}

