/* ===== 複数月レイアウト ===== */
.nhc-front-multi {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
}
.nhc-front-multi .nhc-front-wrap {
    flex: 1 1 280px;
    min-width: 280px;
    max-width: 640px;
}
@media (max-width: 640px) {
    .nhc-front-multi { flex-direction: column; gap: 24px; }
    .nhc-front-multi .nhc-front-wrap { max-width: 100%; }
}

/* ===== ★前後ナビ ===== */
.nhc-front-nav {
    justify-content: center;
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: center;
}
.nhc-nav-btn {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f7f7f7;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: background .15s;
}
.nhc-nav-btn:hover { background: #e8e8e8; color: #111; }
.nhc-nav-disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== フロントエンド カレンダー ===== */
.nhc-front-wrap {
    max-width: 640px;
    margin: 0 auto;
    font-family: inherit;
}

.nhc-front-header {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    padding: 10px 0 6px;
    color: #333;
}

.nhc-front-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    justify-content: center;
}
.nhc-front-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
    font-weight: bold;
}

/* ★曜日ヘッダー: CSS変数で色制御 */
.nhc-front-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}
.nhc-front-table thead th {
    background: var(--nhc-header-bg, #4a5568);
    color: var(--nhc-header-text, #ffffff);
    text-align: center;
    padding: 6px 2px;
    font-size: 12px;
    font-weight: bold;
}
.nhc-front-table thead th:first-child {
    background: var(--nhc-sun-header-bg, #c0392b);
}
.nhc-front-table thead th:last-child {
    background: var(--nhc-sat-header-bg, #2980b9);
}

.nhc-front-table td {
    border: 1px solid #e0e0e0;
    text-align: center;
    padding: 6px 2px;
    min-height: 56px;
    vertical-align: top;
}
.nhc-f-empty { background: #fafafa; }

/* ★日付文字色: CSS変数 */
.nhc-f-num {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: var(--nhc-weekday-text, #333333);
    line-height: 1.4;
}
.nhc-f-sun .nhc-f-num { color: var(--nhc-sun-text, #c0392b); }
.nhc-f-sat .nhc-f-num { color: var(--nhc-sat-text, #2980b9); }

.nhc-f-label {
    display: block;
    font-size: 11px;
    font-weight: bold;
    line-height: 1.4;
    margin-top: 2px;
}
.nhc-f-note {
    display: block;
    font-size: 10px;
    color: #666;
    line-height: 1.3;
    margin-top: 1px;
    word-break: break-all;
}

@media (max-width: 480px) {
    .nhc-front-table thead th,
    .nhc-front-table td { font-size: 11px; padding: 4px 1px; }
    .nhc-f-num   { font-size: 12px; }
    .nhc-f-label { font-size: 10px; }
    .nhc-f-note  { font-size: 9px; }
}

/* ===== 今日の丸マーク ===== */
.nhc-f-today-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    line-height: 1;
}
/* 今日セルのときだけ丸を着色 */
.nhc-f-today .nhc-f-today-ring {
    background: var(--nhc-today-bg, #2c3e50);
    color: var(--nhc-today-text, #ffffff) !important;
}
/* 今日が日曜・土曜でも丸を優先 */
.nhc-f-today.nhc-f-sun .nhc-f-num,
.nhc-f-today.nhc-f-sat .nhc-f-num {
    color: inherit;
}
.nhc-f-today .nhc-f-num {
    color: var(--nhc-today-text, #ffffff);
}
