html { scrollbar-gutter: stable; }
* {
  scroll-margin-top: 80px;
}
:root { 
    --main: #1a1a1a; --sub: #666; --border: #eee; --sun: #e53935; --sat: #1e88e5;
    --gold: #d4af37; --bg: #fff; --container-width: 980px; 
}
body { font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif; margin: 0; background: var(--bg); color: var(--main); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 5px; box-sizing: border-box; }
a { text-decoration: none; color: inherit; }

header { border-bottom: 1px solid var(--border); background: #fff; height: 65px; position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 65px; }
.logo { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.logo-mark { background: var(--sun); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 15px; }

.menu-wrapper { position: relative; }
.menu-btn { border: 1.5px solid var(--main); padding: 6px 14px; font-size: 13px; font-weight: bold; border-radius: 4px; cursor: pointer; }

#nav-menu { 
    display: none; position: absolute; top: 55px; left: 50%; transform: translateX(-50%);
    width: 520px; background: #fff; border: 1px solid var(--border); 
    box-shadow: 0 15px 45px rgba(0,0,0,0.15); border-radius: 12px; z-index: 2000; padding: 24px;
}
#nav-menu.active { display: block; }
.nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nav-grid a { padding: 10px 15px; font-size: 14px; border-radius: 6px; font-weight: bold; }
.nav-grid a:hover { background: #f8f8f8; color: var(--sun); }
.nav-sep { grid-column: 1 / -1; height: 1px; background: #eee; margin: 12px 0; }
.close-m { display: none; }

.top-nav { display: none; }
.top-nav-inner { display: flex; align-items: center; gap: 25px; }
.top-nav a { 
    font-size: 14px; font-weight: bold; color: var(--main); padding: 4px 0;
    position: relative; transition: color 0.2s;
}
.top-nav a:hover { color: var(--sun); }
.top-nav a.highlight,.nav-grid a.highlight{ 
    color: var(--sun); 
}
.nav-divider { width: 1px; height: 16px; background: #ddd; }
.sidebar { position: sticky; top: 80px; align-self: start; }

.main-grid { display: grid; grid-template-columns: 300px 1fr; gap: 40px;margin-top: 5px;}

.main-grid > * { min-width: 0; }
.grid1{grid-template-columns: 1fr;};

.today-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 30px 20px; text-align: center; }
.card-label { font-size: 13px; color: var(--sub); font-weight: bold; margin-bottom: 10px; display: block; }

.big-date { font-size: 48px; font-weight: 800; line-height: 1; margin: 0; letter-spacing: -2px; }
.big-date span { font-size: 26px; font-weight: 700; margin-left: 5px; }

.attr-box { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; border-top: 1px solid #eee; padding-top: 20px; margin-top: 20px; }
.attr-box label { display: block; font-size: 11px; color: var(--sub); }
.attr-box b { font-size: 15px; font-weight: 700; }
.gold-btn { display: block; background: linear-gradient(135deg, #e1c06d 0%, #b38627 100%); color: #fff !important; text-align: center; padding: 16px; border-radius: 8px; font-weight: bold; margin-top: 25px; }

.content-header { text-align: center; margin-bottom: 25px; }
.page-title-meta {font-size: 26px; font-weight: 700; margin: 0;}
.content-header h2 {font-size: 16px; font-weight: normal; color: #666; margin-top: 8px;}

.breadcrumb { font-size: 13px; margin: 10px 0; color: #666; }
.breadcrumb a { color: var(--sat); text-decoration: underline; }
.breadcrumb span { color: #999; }

.month-description { background: #fdfdfd; padding: 20px; border-radius: 8px; border: 1px solid #eee;}
.month-description h3 { font-size: 16px; margin-top: 0; color: var(--main); }
.month-description p { font-size: 14px; color: #555; line-height: 1.6; margin-bottom: 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 10px; }
.pager-btn { border: 1px solid #ddd; padding: 6px 20px; border-radius: 20px; font-size: 13px; font-weight: bold; background: #fff; }
.pager-btn-today { background: #f8f9fa; border-color: #999; }
.cur-m { font-size: 20px; font-weight: 700;}


.cal-table { width: 100%; table-layout: fixed; border-collapse: collapse; border: 1px solid var(--border); }
.cal-table th { background: #fdfdfd; padding: 12px 0; font-size: 12px; border: 1px solid var(--border); color: #777; }
.cal-table td { border: 1px solid var(--border); height: 70px; vertical-align: top; position: relative; box-sizing: border-box; padding: 0; }

.cell-link { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    height: 100%; 
    width: 100%; 
    text-decoration: none; 
}
.cell-link:hover { background: #fafafa; }

.d-num { font-size: 18px; font-weight: 700; line-height: 1.2; }

.d-rok { 
    font-size: 10px; 
    color: #999; 
    display: flex; 
    align-items: center; 
    gap: 2px; 
    line-height: 1.2; 
    margin-top: 2px; 
    text-align: center; 
}


.d-lunar {
    font-size: 9px;
    color: #999;
    line-height: 1.2;
    text-align: center;
    margin-top: auto;
    padding-bottom: 3px;
}


.tabs { display: flex; flex-wrap: wrap; background: #f8f8f8; border-radius: 8px 8px 0 0; border: 1px solid var(--border); border-bottom: none; }
.tab-label { flex: 1; padding: 12px; text-align: center; font-size: 13px; font-weight: bold; cursor: pointer; color: var(--sub); border-bottom: 2px solid transparent; transition: 0.2s; }
.tab-content { display: none; background: #fff; border: 1px solid var(--border); border-top: none; border-radius: 0 0 12px 12px; padding: 25px 20px; }


#tab-today:checked ~ .tabs .label-today,
#tab-tomorrow:checked ~ .tabs .label-tomorrow { color: var(--main); border-bottom: 2px solid var(--sun); background: #fff; }

#tab-today:checked ~ #content-today,
#tab-tomorrow:checked ~ #content-tomorrow { display: block; }

.tab-radio { display: none; }


.today-card { padding: 0; border: none; background: none; }
.card-body { text-align: center; }


.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-lucky { background: var(--gold); }
.dot-holiday { background: var(--sun); }


.cal-legend { display: flex; justify-content: center; gap: 15px; font-size: 11px; color: #888; margin: 12px 0; }
.legend-item { display: flex; align-items: center; gap: 4px; }

.sun { color: var(--sun); background: #FFF0F0 !important;outline: 2px solid var(--sun) inset;}
.sat { color: var(--sat);background: #F0F7FF !important;outline: 2px solid var(--sat) inset;}
.holiday .d-num { color: var(--sun); }
.is-today{background: #fffced !important;box-shadow: inset 0 0 0 1px #b38627;position: relative;z-index: 2;}
.month-detail-btn {
    display: inline-block; background: #f8f9fa; border: 1px solid var(--main); color: var(--main);
    padding: 19px 20px; border-radius: 30px; font-size: 14px; font-weight: bold; transition: all 0.2s;
}
.month-detail-btn:hover { background: var(--main); color: #fff; text-decoration: none; }

.article-section h3 { border-left: 4px solid var(--main); padding-left: 15px; font-size: 18px; margin-bottom: 20px; }
.info-row { display: flex; border-bottom: 1px solid var(--border); padding: 14px 0; font-size: 14px; }
.row-date { width: 120px; font-weight: 700; }
.row-date .link{color: #0000EE;text-decoration: underline;}
.index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.index-item { background: #fff; border: 1px solid #eee; padding: 15px; text-align: center; border-radius: 8px; font-size: 13px; font-weight: bold; }
.index-item:hover { border-color: var(--main); color: var(--sun); }

.footer-content-box { background: #fafafa; padding: 30px; border-radius: 12px; margin: 50px 0; font-size: 14px; color: #555; border: 1px solid #eee; }

footer { padding: 60px 0; text-align: center; color: #999; font-size: 12px; border-top: 1px solid var(--border); background: #fafafa; }
.footer-links { margin-bottom: 20px; display: flex; justify-content: center; gap: 25px; }

@media (max-width: 900px) {
    .top-nav { display: none !important; }
    #nav-menu { position: fixed; top: 0; left: 0; transform: none; width: 100%; height: 100vh; padding: 60px 20px 30px; box-sizing: border-box; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .nav-grid { grid-template-columns: 1fr; }
    .close-m { display: block; position: fixed; top: 15px; right: 20px; font-size: 32px; width: 44px; height: 44px; line-height: 44px; text-align: center; z-index: 2100; cursor: pointer; }
    .main-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}
@media (min-width: 901px) {
    .top-nav { display: block; }
    .header-inner { gap: 15px; }
}


.lucky-tag {
    color: #b8860b;
    background-color: #fff9e6;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-block;
    margin: 2px 0;
}



.attr-box-v2 { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 15px 5px; 
    border-top: 1px solid #eee; 
    padding: 15px 0; 
    margin-top: 15px; 
}
.attr-box-v2 label { display: block; font-size: 10px; color: #999; margin-bottom: 2px; }
.attr-box-v2 b { font-size: 14px; color: #333; }


.lucky-bad-zone { padding: 10px 0; border-top: 1px dashed #eee; text-align: center; }
.sidebar-tag { 
    display: inline-block; 
    padding: 2px 6px; 
    margin: 2px; 
    font-size: 11px; 
    border-radius: 3px; 
    font-weight: bold; 
}
.good-tag { background: #fff9e6; color: #b38627; border: 1px solid #f0e0b0; }
.bad-tag { background: #f8f8f8; color: #999; border: 1px solid #ddd; }
.gedan-tag { background: #fff9e6; color: #b38627; border: 1px solid #f0e0b0;display: inline-block;
    padding: 2px 6px;
    margin: 2px;
    font-size: 11px;
    border-radius: 3px;
    font-weight: bold; }
.ichiryu-tag { background: #f0fff0; color: #228B22; border-color: #90EE90; }


.jieqi-tag { background: #e8f4fd; color: #1976D2; border: 1px solid #90CAF9; display: inline-block;
    padding: 2px 6px;
    margin: 2px;
    font-size: 11px;
    border-radius: 3px;
    font-weight: bold; }


.holiday-tag { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; display: inline-block;
    padding: 2px 6px;
    margin: 2px;
    font-size: 11px;
    border-radius: 3px;
    font-weight: bold; }

.rokuyou-tag {  display: inline-block;
    padding: 2px 6px;
    margin: 2px;
    font-size: 11px;
    border-radius: 3px;
    font-weight: bold; }

.rokuyou-tag.taian { background: #ffebee; color: #d44c4c; border-color: #ef5350; }

.attr-box-v2 .rokuyou-tag {
    display: inline-block;
    font-size: 14px;
    padding: 2px 8px;
    margin: 0;
}


.d-rok .rokuyou-tag {
    font-size: 10px;
    padding: 1px 4px;
    margin: 0;
    border-width: 0;
    background: transparent;
}
.d-rok .rokuyou-tag.taian {
    background: transparent;
    color: #d44c4c;
    font-weight: bold;
}


.row-content .rokuyou-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    margin: 2px 0 2px 8px;
    vertical-align: middle;
}


.lucky-bad-zone .gedan-tag,
.lucky-bad-zone .ichiryu-tag,
.lucky-bad-zone .danger-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    margin: 2px;
}

.danger-tag { background: #f8f8f8; color: #999; border: 1px solid #ddd;display: inline-block;
    padding: 2px 6px;
    margin: 2px;
    font-size: 11px;
    border-radius: 3px;
    font-weight: bold; }
@media (min-width: 901px) {
    .sidebar {
        height: auto;
    }
}

.yearly-cal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px; 
}
.month-block {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.month-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.month-block-header h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    width: 100%;
}
.month-block-header h2 a {
    color: var(--main);
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.month-block-header h2 a:hover {
    color: var(--sat);
}
.title-arrow {
    font-size: 16px;
    font-weight: 400;
    color: var(--sat);
    transition: all 0.2s;
}
.month-block-header h2 a:hover .title-arrow {
    transform: translateX(3px);
}
.cal-legend-top {
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.month-block .cal-legend {
    margin: 0;
}

.yearly-cal-grid .responsive {
    grid-column: 1 / -1;
}


.year-summary,
.month-summary {
    margin: 40px 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
}
.summary-overview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}
.summary-block {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid var(--border);
}
.summary-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.summary-block h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px 0;
    padding-left: 12px;
    border-left: 4px solid var(--sat);
}


.rokuyou-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rokuyou-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}
.rokuyou-label {
    min-width: 50px;
}
.rokuyou-track {
    flex: 1;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}
.rokuyou-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}
.rokuyou-count {
    min-width: 80px;
    font-size: 13px;
    color: #666;
    text-align: right;
}


.holiday-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.holiday-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
}
.holiday-date {
    display: flex;
    align-items: baseline;
    gap: 2px;
    min-width: 60px;
    font-weight: 700;
    font-size: 14px;
}
.holiday-day { font-size: 18px; }
.holiday-week { font-size: 12px; color: #999; }
.holiday-week.sun { color: var(--sun); }
.holiday-name { font-size: 14px; }


.taian-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.taian-date {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    background: #FFF0F0;
    border: 1px solid #ffcccc;
    border-radius: 4px;
    font-size: 12px;
    color: #d44c4c;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}
.taian-date:hover {
    background: #d44c4c;
    color: #fff;
}
.taian-m { font-size: 11px; }
.taian-d { font-size: 14px; }


.special-dates-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.special-date-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.tensha-item {
    background: #f0fff0;
    border: 1px solid #90EE90;
    color: #228B22;
}
.tensha-item:hover {
    background: #228B22;
    color: #fff;
}
.ichiryu-item {
    background: #FFF9E6;
    border: 1px solid #f0e0b0;
    color: #b38627;
}
.ichiryu-item:hover {
    background: #b38627;
    color: #fff;
}
.special-month { font-size: 12px; }
.special-day { font-size: 15px; }


.lucky-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}
.lucky-type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #FFF9E6;
    border: 1px solid #f0e0b0;
    border-radius: 6px;
    font-size: 13px;
}
.lucky-type-name {
    font-weight: 600;
    color: #b38627;
}
.lucky-type-count {
    font-weight: 700;
    color: #666;
}


.jieqi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.jieqi-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #e8f4fd;
    border-radius: 6px;
    font-size: 13px;
}
.jieqi-date {
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}
.jieqi-name {
    font-weight: 700;
    color: #1976D2;
}


.month-holiday-chart {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
}
.month-holiday-bar {
    text-align: center;
    padding: 10px 4px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 12px;
}
.month-holiday-bar.has-holiday {
    background: #FFF0F0;
    border: 1px solid #ffcccc;
}
.month-holiday-bar.has-lucky {
    background: #FFF9E6;
    border: 1px solid #f0e0b0;
}
.month-holiday-label {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 13px;
}
.month-holiday-count {
    font-size: 14px;
    font-weight: 700;
    color: var(--main);
}

@media (max-width: 900px) {
    .year-summary,
    .month-summary {
        padding: 20px 15px;
    }
    .month-holiday-chart {
        grid-template-columns: repeat(6, 1fr);
    }
    .rokuyou-bar {
        flex-wrap: wrap;
    }
    .rokuyou-count {
        min-width: auto;
        text-align: left;
        width: 100%;
        margin-top: 4px;
    }
    .jieqi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .lucky-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 900px) {
    .yearly-cal-grid {
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    .month-block {
        padding: 15px;
    }
}

.green{color:green;}
.responsive{width:100%;max-width:100%;box-sizing:border-box;clear:both;margin:15px auto;display:block;text-align:center}.responsive{height:100px !important;max-height:100px !important}.responsive{content-visibility:auto;contain-intrinsic-size:auto 250px;height:250px !important;max-height:250px !important;overflow:hidden}@media (max-width:767px){.responsive{max-width:100vw;position:relative}}@media (min-width:1024px){.responsive{contain-intrinsic-size:auto 250px;height:250px !important;max-height:250px !important;max-width:300px;margin:15px auto;background:#fdfdfd;border:1px solid #f0f0f0;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.02)}}
