@charset "UTF-8";
/*
 * 暦カレンダー
 *
 * すべて .kkc-calendar 配下に閉じてあるので、既存の CSS には影響しません。
 * 配色は既存の .koyomi-sub-nav に合わせています。
 *   背景 #1B2538 / 文字 #faf9f6 / アクセント #D4AF37
 *
 * テーマ（AFFINGER）が table に当てているスタイルを打ち消すため、
 * セル系のセレクタは .kkc-grid を必ず挟んで詳細度を揃えてあります。
 * ここを崩すと曜日ヘッダーの色などが効かなくなるので注意してください。
 *
 * 既存 CSS は追記のみ。調整が必要なときはこのファイルの末尾に追記してください。
 */

.kkc-calendar {
	--kkc-navy: #1b2538;
	--kkc-paper: #faf9f6;
	--kkc-gold: #d4af37;
	--kkc-line: #d8dce4;
	--kkc-text: #23282d;
	--kkc-muted: #7b8494;
	--kkc-sun: #b4232a;
	--kkc-sun-bg: #fdf4f4;
	--kkc-sat: #1f4e8c;
	--kkc-sat-bg: #f3f7fc;

	/* 下は広めに取る。すぐ下に解説の見出し（h2）が来ることが多く、
	   詰まっているとカレンダーと解説が地続きに見えるため。 */
	margin: 1.6em 0 3.4em;
	color: var(--kkc-text);
	font-size: 16px;
	line-height: 1.6;
	-webkit-text-size-adjust: 100%;
}

.kkc-calendar *,
.kkc-calendar *::before,
.kkc-calendar *::after {
	box-sizing: border-box;
}

/* テーマがコンテンツ内のリンクに当てている
   高さ・装飾・アイコン（疑似要素）をまとめて打ち消す。
   余白と行の高さは、この下の個別指定で作り直す。 */
.kkc-calendar a {
	box-sizing: border-box;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	background-image: none !important;
	box-shadow: none !important;
	text-indent: 0 !important;
	text-decoration: none;
}

.kkc-calendar a::before,
.kkc-calendar a::after {
	content: none !important;
	display: none !important;
}

.kkc-calendar .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------------------------------------------------------- 見出しとリンク */

.kkc-calendar .kkc-head {
	display: flex !important;
	flex-wrap: wrap !important;
	/* baseline にすると見出しの行の高さに引っぱられて
	   リンクの枠が上に伸びる。中央揃えで固定する。 */
	align-items: center !important;
	justify-content: space-between !important;
	gap: 0.4em 1em !important;
	padding: 0 0 0.5em !important;
	border: 0 !important;
	border-bottom: 2px solid var(--kkc-gold) !important;
	margin: 0 0 0.9em !important;
	background: none !important;
}

/* テーマが h2 に付けている飾り（背景の箱・左の帯・下線・余白）を打ち消す。
   とくに margin が残っていると、flex の中央揃えが余白込みで計算され、
   右の記念日リンクだけ下にずれる。 */
.kkc-calendar .kkc-head .kkc-month {
	display: block !important;
	position: static !important;
	box-sizing: border-box !important;
	width: auto !important;
	min-height: 0 !important;
	height: auto !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	margin: 0 !important;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: var(--kkc-navy) !important;
	font-size: 1.35em !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	text-align: left !important;
	text-shadow: none !important;
	letter-spacing: normal !important;
}

.kkc-calendar .kkc-head .kkc-month::before,
.kkc-calendar .kkc-head .kkc-month::after {
	content: none !important;
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	background: none !important;
}

.kkc-calendar .kkc-head .kkc-month .kkc-month__main {
	color: inherit !important;
	font-size: 1em !important;
	font-weight: inherit !important;
	line-height: inherit !important;
}

.kkc-calendar .kkc-head .kkc-month .kkc-wafu {
	margin-left: 0.4em !important;
	color: var(--kkc-muted) !important;
	font-size: 0.72em !important;
	font-weight: 500 !important;
	line-height: inherit !important;
}

.kkc-calendar .kkc-wafu {
	color: var(--kkc-muted);
	font-size: 0.72em;
	font-weight: 500;
}

/* テーマがコンテンツ内の a に当てている行の高さ・余白・高さ指定を
   すべて打ち消す。ここだけは !important を使う。
   （.kkc-calendar の中だけに効くので、サイトの他の場所には影響しない）
   inline-flex にすることで、中の文字ちょうどの高さに収まる。 */
/* 高さを em で固定し、中身を上下中央に置く。
   こうしておくと、テーマが行の高さや余白に何を指定しても枠が伸びない。
   文字は中の span が持ち、そちらの行の高さも 1 に固定する。 */
.kkc-calendar .kkc-head .kkc-anniv {
	display: inline-flex !important;
	position: static !important;
	box-sizing: border-box !important;
	float: none !important;
	align-items: center !important;
	align-self: center !important;
	justify-content: center !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: 100% !important;
	height: 2.5em !important;
	min-height: 0 !important;
	max-height: none !important;
	padding: 0 1.1em !important;
	border: 1px solid var(--kkc-gold) !important;
	border-radius: 999px !important;
	margin: 0 !important;
	background: #fffdf6 !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #7a5f10 !important;
	font-size: 0.82em !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	text-indent: 0 !important;
	vertical-align: middle !important;
	white-space: nowrap !important;
	overflow: hidden !important;
}

.kkc-calendar .kkc-head .kkc-anniv__label {
	display: block !important;
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	margin: 0 !important;
	background: none !important;
	color: inherit !important;
	font-size: 1em !important;
	font-weight: inherit !important;
	line-height: 1 !important;
	text-indent: 0 !important;
	white-space: nowrap !important;
}

.kkc-calendar .kkc-head .kkc-anniv__label::before,
.kkc-calendar .kkc-head .kkc-anniv__label::after {
	content: none !important;
	display: none !important;
}

.kkc-calendar .kkc-head .kkc-anniv::before,
.kkc-calendar .kkc-head .kkc-anniv::after {
	content: none !important;
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}

.kkc-calendar .kkc-head .kkc-anniv:hover,
.kkc-calendar .kkc-head .kkc-anniv:focus {
	background: var(--kkc-gold);
	color: var(--kkc-navy);
}

/* ------------------------------------------------------------ 月の切り替え */

.kkc-calendar .kkc-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.4em;
	margin-bottom: 0.7em;
}

.kkc-calendar .kkc-nav__link {
	display: inline-flex !important;
	align-items: center !important;
	flex: 0 1 auto;
	width: auto !important;
	padding: 0.35em 0.75em !important;
	border: 1px solid var(--kkc-line);
	border-radius: 4px;
	margin: 0 !important;
	background: #fff;
	color: var(--kkc-navy);
	font-size: 0.8em;
	line-height: 1.3 !important;
	text-decoration: none;
	vertical-align: middle;
	white-space: nowrap;
}

.kkc-calendar .kkc-nav__link:hover,
.kkc-calendar .kkc-nav__link:focus {
	border-color: var(--kkc-navy);
	background: var(--kkc-navy);
	color: var(--kkc-paper);
}

.kkc-calendar .kkc-nav__link--home {
	border-color: var(--kkc-gold);
	background: #fffdf6;
	color: #7a5f10;
}

.kkc-calendar .kkc-nav__link--home:hover,
.kkc-calendar .kkc-nav__link--home:focus {
	border-color: var(--kkc-gold);
	background: var(--kkc-gold);
	color: var(--kkc-navy);
}

/* 当月を見ているときは行き先がないのでリンクにしない */
.kkc-calendar .kkc-nav__now {
	flex: 0 1 auto;
	padding: 0.3em 0.7em;
	color: var(--kkc-muted);
	font-size: 0.8em;
	white-space: nowrap;
}

.kkc-calendar .kkc-nav__link.is-disabled {
	border-color: transparent;
	background: none;
	pointer-events: none;
}

/* ------------------------------------------------------------ 月グリッド */

/* テーマが table を display:block にしていても横スクロールさせない */
/* テーマはスマホ対策で table に display:block; overflow-x:scroll を
   当てていることがある。それを許すと表組みが解けて、
   列の幅が中身まかせのバラバラになる（狭い列で月齢が2行に割れる）。
   ここは !important で守る。 */
.kkc-calendar .kkc-grid {
	display: table !important;
	width: 100% !important;
	max-width: 100% !important;
	table-layout: fixed !important;
	overflow-x: visible !important;
	white-space: normal !important;
	border-collapse: collapse;
	border: 1px solid var(--kkc-line);
	margin: 0;
	overflow: visible;
	background: #fff;
	font-size: 1em;
	white-space: normal;
}

.kkc-calendar .kkc-grid thead {
	display: table-header-group;
}

.kkc-calendar .kkc-grid tbody {
	display: table-row-group;
}

.kkc-calendar .kkc-grid tr {
	display: table-row;
	background: none;
}

.kkc-calendar .kkc-grid th,
.kkc-calendar .kkc-grid td {
	display: table-cell;
	width: auto;
	padding: 0;
	border: 1px solid var(--kkc-line);
	background: none;
	vertical-align: top;
	text-align: left;
	white-space: normal;
}

/* --- 曜日ヘッダー --- */

.kkc-calendar .kkc-grid .kkc-wd {
	padding: 0.35em 0.2em;
	background: var(--kkc-navy);
	color: var(--kkc-paper);
	font-size: 0.78em;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-align: center;
}

.kkc-calendar .kkc-grid .kkc-wd--sun {
	color: #ffc9c9;
}

.kkc-calendar .kkc-grid .kkc-wd--sat {
	color: #bcd8fb;
}

/* --- 日付セル --- */

.kkc-calendar .kkc-grid .kkc-cell {
	height: 1px; /* Safari 対策。中身の高さで伸びる */
	padding: 0.3em 0.4em 0.32em;
	overflow-wrap: anywhere;
	word-break: normal;
	line-break: strict;
}

.kkc-calendar .kkc-grid .kkc-cell--empty {
	background: #f7f8fa;
}

.kkc-calendar .kkc-grid .kkc-cell--sun,
.kkc-calendar .kkc-grid .kkc-cell.is-holiday {
	background: var(--kkc-sun-bg);
}

.kkc-calendar .kkc-grid .kkc-cell--sat {
	background: var(--kkc-sat-bg);
}

/* 節気・雑節の該当日のマーカー（左端の金色の線）は外しています。
   下のバッジと情報が重複するためです。
   戻したい場合は、次の2行のコメントを外してください。

.kkc-calendar .kkc-grid .kkc-cell.is-marked {
	box-shadow: inset 3px 0 0 var(--kkc-gold);
}
*/

.kkc-calendar .kkc-grid .kkc-cell.is-today {
	outline: 2px solid var(--kkc-gold);
	outline-offset: -2px;
}

/* -------------------------------------------------------------- セル内容 */

.kkc-calendar .kkc-day {
	display: block;
	color: var(--kkc-navy);
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.15;
}

.kkc-calendar .kkc-grid .kkc-cell--sun .kkc-day,
.kkc-calendar .kkc-grid .kkc-cell.is-holiday .kkc-day {
	color: var(--kkc-sun);
}

.kkc-calendar .kkc-grid .kkc-cell--sat .kkc-day {
	color: var(--kkc-sat);
}

.kkc-calendar .kkc-day a {
	color: inherit;
	text-decoration: none;
}

.kkc-calendar .kkc-day a:hover,
.kkc-calendar .kkc-day a:focus {
	text-decoration: underline;
}

.kkc-calendar .kkc-rokuyo,
.kkc-calendar .kkc-kyureki,
.kkc-calendar .kkc-moon {
	display: block;
	margin-top: 0.12em;
	font-size: 0.95em;
	line-height: 1.32;
}

/* --- 月の満ち欠け --- */

.kkc-calendar .kkc-moon {
	display: flex;
	align-items: center;
	gap: 0.3em;
}

.kkc-calendar .kkc-moon-icon {
	display: block;
	flex: 0 0 auto;
	width: 1.55em;
	height: 1.55em;
	overflow: visible;
}

.kkc-calendar .kkc-moon-disc {
	fill: #3c4658;
}

.kkc-calendar .kkc-moon-lit {
	fill: #f2d98b;
}

.kkc-calendar .kkc-moon-edge {
	fill: none;
	stroke: #2b3444;
	stroke-width: 4;
}

.kkc-calendar .kkc-rokuyo {
	color: #4a5364;
	font-weight: 600;
}

/* 大安は控えめに強調、仏滅は控えめに抑える */
.kkc-calendar .kkc-rokuyo--taian {
	display: inline-block;
	padding: 0 0.3em;
	border-radius: 3px;
	background: #fbf3dc;
	color: #7a5f10;
}

.kkc-calendar .kkc-rokuyo--butsumetsu {
	color: #9aa3b0;
	font-weight: 500;
}

.kkc-calendar .kkc-kyureki {
	color: #5a6371;
}

.kkc-calendar .kkc-moon {
	color: var(--kkc-muted);
}

.kkc-calendar .kkc-moon-label {
	margin-right: 0.2em;
}

.kkc-calendar .kkc-notes {
	display: block;
	margin-top: 0.2em;
}

.kkc-calendar .kkc-note {
	display: inline-block;
	max-width: 100%;
	padding: 0 0.28em;
	border-radius: 3px;
	margin: 0 0.14em 0.12em 0;
	font-size: 0.88em;
	font-weight: 600;
	line-height: 1.5;
}

.kkc-calendar .kkc-note--sekki {
	background: #e3efe1;
	color: #2b6330;
}

.kkc-calendar .kkc-note--zassetsu {
	background: #efe8da;
	color: #6f560e;
}

.kkc-calendar .kkc-note--phase {
	background: #e4e7f4;
	color: #38427c;
}

.kkc-calendar .kkc-note--holiday {
	background: #f9dede;
	color: var(--kkc-sun);
}

/* ------------------------------------------------------------- 月のこよみ */

.kkc-calendar .kkc-summary {
	padding: 0.9em 1em;
	border: 1px solid var(--kkc-line);
	border-radius: 6px;
	margin-top: 1.1em;
	background: #fbfbfc;
}

/* h3 もテーマの飾りを打ち消す（h2 と同じ理由） */
.kkc-calendar .kkc-summary .kkc-summary__title {
	display: block !important;
	position: static !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	margin: 0 0 0.5em !important;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: var(--kkc-navy) !important;
	font-size: 0.95em !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	text-align: left !important;
	text-shadow: none !important;
}

.kkc-calendar .kkc-summary .kkc-summary__title::before,
.kkc-calendar .kkc-summary .kkc-summary__title::after {
	content: none !important;
	display: none !important;
}

.kkc-calendar .kkc-summary__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em 1.2em;
	padding: 0;
	margin: 0;
	list-style: none;
}

.kkc-calendar .kkc-summary__item {
	display: flex;
	align-items: baseline;
	gap: 0.4em;
	padding: 0;
	margin: 0;
	font-size: 0.85em;
	list-style: none;
}

.kkc-calendar .kkc-summary__item::before,
.kkc-calendar .kkc-summary__item::after {
	content: none;
}

.kkc-calendar .kkc-summary__day {
	min-width: 2.6em;
	color: var(--kkc-muted);
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.kkc-calendar .kkc-summary__label {
	color: var(--kkc-text);
	font-weight: 600;
}

/* ----------------------------------------------------------- マスの見方 */

/* 折りたたみ。閉じていれば1行ぶんの高さしか取らない。
   中身は DOM にあるので検索エンジンからは読める。 */
.kkc-calendar .kkc-legend {
	padding: 0;
	border: 0;
	border-top: 1px solid var(--kkc-line);
	border-radius: 0;
	margin-top: 0.9em;
	background: none;
}

.kkc-calendar .kkc-legend .kkc-legend__title {
	display: flex !important;
	position: static !important;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.2em 0.7em;
	padding: 0.7em 0.2em !important;
	border: 0 !important;
	border-radius: 0 !important;
	margin: 0 !important;
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
	color: var(--kkc-navy) !important;
	font-size: 0.9em !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	text-align: left !important;
	cursor: pointer;
	list-style: none;
}

/* 既定の三角は display:flex にすると消えるので、自前で描く */
.kkc-calendar .kkc-legend .kkc-legend__title::-webkit-details-marker {
	display: none;
}

.kkc-calendar .kkc-legend .kkc-legend__title::before {
	content: "" !important;
	display: block !important;
	flex: 0 0 auto;
	/* 幅0＋ボーダーで三角を描くので、ここだけ content-box に戻す。
	   border-box のままだと三角が潰れて消える。 */
	box-sizing: content-box !important;
	width: 0;
	height: 0;
	border-top: 0.34em solid transparent;
	border-bottom: 0.34em solid transparent;
	border-left: 0.48em solid currentColor;
	margin-right: 0.1em;
	background: none !important;
	transform: translateY(0.05em);
	transition: transform 0.15s ease;
}

.kkc-calendar .kkc-legend[open] .kkc-legend__title::before {
	transform: translateY(0.05em) rotate(90deg);
}

.kkc-calendar .kkc-legend .kkc-legend__title:hover,
.kkc-calendar .kkc-legend .kkc-legend__title:focus {
	color: #3c4a66 !important;
}

.kkc-calendar .kkc-legend__hint {
	color: var(--kkc-muted);
	font-size: 0.85em;
	font-weight: 400;
}

/* テーマが見出しに付ける飾りを消す。
   ::before は自前の三角に使っているので、ここでは触らない。 */
.kkc-calendar .kkc-legend .kkc-legend__title::after {
	content: none !important;
	display: none !important;
}

.kkc-calendar .kkc-legend__body {
	display: flex;
	padding: 0.2em 0.2em 1em;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1em 1.4em;
}

/* --- 左: 実物と同じ見た目のマス --- */

.kkc-calendar .kkc-legend__sample {
	position: relative;
	flex: 0 0 auto;
}

.kkc-calendar .kkc-legend__caption {
	display: block;
	margin-bottom: 0.3em;
	color: var(--kkc-muted);
	font-size: 0.78em;
}

.kkc-calendar .kkc-legend__cell {
	width: 13em;
	max-width: 100%;
	padding: 0.5em 0.6em 0.6em;
	border: 1px solid var(--kkc-line);
	border-radius: 4px;
	background: #fff;
}

.kkc-calendar .kkc-legend__line {
	display: flex;
	align-items: flex-start;
	gap: 0.45em;
	margin-top: 0.2em;
}

.kkc-calendar .kkc-legend__line:first-child {
	margin-top: 0;
}

.kkc-calendar .kkc-legend__item {
	flex: 1 1 auto;
	min-width: 0;
}

.kkc-calendar .kkc-legend__item .kkc-rokuyo,
.kkc-calendar .kkc-legend__item .kkc-kyureki,
.kkc-calendar .kkc-legend__item .kkc-moon,
.kkc-calendar .kkc-legend__item .kkc-day {
	margin-top: 0;
}

/* 凡例のマスは本物より広いので、バッジの間に余白を戻す
   （スマホ用の詰めた指定を打ち消す） */
.kkc-calendar .kkc-legend__item .kkc-notes {
	margin-top: 0;
}

.kkc-calendar .kkc-legend__item .kkc-note {
	margin: 0 0.3em 0.2em 0;
	padding: 0 0.35em;
}

/* --- 番号 --- */

.kkc-calendar .kkc-legend__num {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 1.5em;
	height: 1.5em;
	border-radius: 50%;
	margin-top: 0.15em;
	background: var(--kkc-navy);
	color: var(--kkc-paper);
	font-size: 0.72em;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

/* --- 右: 番号に対応した説明 --- */

.kkc-calendar .kkc-legend__list {
	flex: 1 1 16em;
	padding: 0;
	margin: 0;
	list-style: none;
}

/* 項目のあいだは1行ぶん空ける。
   スマホでは1項目が2〜3行に折り返すので、
   詰めると5項目がひと続きの文章に見えてしまう。 */
.kkc-calendar .kkc-legend__desc {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	padding: 0;
	margin: 0 0 1.5em;
	font-size: 0.85em;
	line-height: 1.6;
	list-style: none;
}

.kkc-calendar .kkc-legend__desc:last-child {
	margin-bottom: 0;
}

.kkc-calendar .kkc-legend__desc::before,
.kkc-calendar .kkc-legend__desc::after {
	content: none;
}

.kkc-calendar .kkc-legend__desc strong {
	color: var(--kkc-navy);
	font-weight: 700;
}

/* --------------------------------------------------------- 年月の選択 */

/* テーマは select や button に width:100% を当てていることが多い。
   そのままだと1つずつ改行されて縦に伸びるので、ここも打ち消す。 */
.kkc-calendar .kkc-picker {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.5em 0.9em !important;
	width: auto !important;
	max-width: 100% !important;
	padding: 0.75em 0.2em !important;
	border: 0 !important;
	border-top: 1px solid var(--kkc-line) !important;
	border-radius: 0 !important;
	margin: 0.9em 0 0 !important;
	background: none !important;
	box-shadow: none !important;
}

.kkc-calendar .kkc-picker__title {
	flex: 0 0 auto;
	color: var(--kkc-navy);
	font-size: 0.88em;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
}

.kkc-calendar .kkc-picker__controls {
	display: flex !important;
	flex: 0 1 auto !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.4em !important;
	width: auto !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

.kkc-calendar .kkc-picker__select {
	display: inline-block !important;
	box-sizing: border-box !important;
	flex: 0 1 auto !important;
	float: none !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	padding: 0.35em 1.8em 0.35em 0.6em !important;
	border: 1px solid var(--kkc-line) !important;
	border-radius: 4px !important;
	margin: 0 !important;
	background: #fff !important;
	box-shadow: none !important;
	color: var(--kkc-text) !important;
	font-family: inherit !important;
	font-size: 0.88em !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	vertical-align: middle !important;
}

.kkc-calendar .kkc-picker__submit {
	display: inline-block !important;
	box-sizing: border-box !important;
	flex: 0 0 auto !important;
	float: none !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	padding: 0.45em 1.4em !important;
	border: 1px solid var(--kkc-navy) !important;
	border-radius: 4px !important;
	margin: 0 !important;
	background: var(--kkc-navy) !important;
	background-image: none !important;
	box-shadow: none !important;
	color: var(--kkc-paper) !important;
	font-family: inherit !important;
	font-size: 0.88em !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	text-shadow: none !important;
	text-decoration: none !important;
	vertical-align: middle !important;
	white-space: nowrap !important;
	cursor: pointer;
}

.kkc-calendar .kkc-picker__submit::before,
.kkc-calendar .kkc-picker__submit::after {
	content: none !important;
	display: none !important;
}

.kkc-calendar .kkc-picker__submit:hover,
.kkc-calendar .kkc-picker__submit:focus {
	background: #2c3a54 !important;
	color: var(--kkc-paper) !important;
}

/* データが読めなかったときの管理者向け表示 */
.kkc-error {
	padding: 0.8em 1em;
	border: 1px solid #d9a0a0;
	border-radius: 4px;
	margin: 1em 0;
	background: #fdf4f4;
	color: #8c1f24;
	font-size: 0.9em;
}

.kkc-calendar .kkc-footnote {
	margin: 0.8em 0 0;
	color: var(--kkc-muted);
	font-size: 0.78em;
	line-height: 1.6;
}

/* ------------------------------------------------------------ 画面幅対応 */

/* タブレット以下: 全体を少し詰める */
@media screen and (max-width: 782px) {

	.kkc-calendar {
		font-size: 15px;
	}

	.kkc-calendar .kkc-grid .kkc-cell {
		padding: 0.28em 0.26em 0.3em;
	}

	.kkc-calendar .kkc-day {
		font-size: 1.2em;
	}

	.kkc-calendar .kkc-rokuyo,
	.kkc-calendar .kkc-kyureki,
	.kkc-calendar .kkc-moon {
		font-size: 0.86em;
	}

	.kkc-calendar .kkc-note {
		font-size: 0.8em;
	}

	.kkc-calendar .kkc-moon-icon {
		width: 1.4em;
		height: 1.4em;
	}
}

/* スマートフォン: 情報の優先度を下げたものから削る */
@media screen and (max-width: 560px) {

	.kkc-calendar {
		font-size: 14px;
	}

	.kkc-calendar .kkc-head {
		gap: 0.3em;
	}

	.kkc-calendar .kkc-month {
		font-size: 1.15em;
	}

	.kkc-calendar .kkc-anniv {
		padding: 0.3em 0.7em;
		font-size: 0.76em;
	}

	.kkc-calendar .kkc-grid .kkc-cell {
		padding: 0.28em 0.16em 0.36em;
	}

	.kkc-calendar .kkc-grid .kkc-wd {
		font-size: 0.74em;
	}

	.kkc-calendar .kkc-day {
		font-size: 1em;
	}

	/* 月齢は数値だけ残す（「月齢」の3文字ぶんを幅に回す） */
	.kkc-calendar .kkc-moon-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(1px, 1px, 1px, 1px);
		clip-path: inset(50%);
	}

	/* 1マスに5項目入るので、ここを詰めすぎると読めなくなる。
	   9px 台まで落とさず、10px 台を保つ。 */
	.kkc-calendar .kkc-rokuyo,
	.kkc-calendar .kkc-kyureki,
	.kkc-calendar .kkc-moon {
		font-size: 0.75em;
		line-height: 1.5;
	}

	.kkc-calendar .kkc-moon-icon {
		width: 1.3em;
		height: 1.3em;
	}

	/* マスの横幅をラベルに回すため、左右の余白は最小限にする */
	.kkc-calendar .kkc-note {
		padding: 0 0.1em;
		margin-right: 0;
		font-size: 0.72em;
		line-height: 1.55;
	}

	.kkc-calendar .kkc-nav__link {
		font-size: 0.76em;
	}
}

/* 幅の狭い端末: マスの左右余白を削り、そのぶんをラベルに回す
   （「彼岸入り」「秋分の日」など4文字のラベルを1行に収めるため） */
@media screen and (max-width: 430px) {

	.kkc-calendar .kkc-grid .kkc-cell {
		padding: 0.28em 0.1em 0.36em;
	}

	.kkc-calendar .kkc-note {
		padding: 0 0.05em;
	}
}

/* 小型端末: 月齢を隠す。カレンダーとしての可読性を優先する */
@media screen and (max-width: 359px) {

	.kkc-calendar .kkc-moon {
		display: none;
	}
}

/* --------------------------------------------------------------- 印刷 */

@media print {

	.kkc-calendar .kkc-nav {
		display: none;
	}

	.kkc-calendar .kkc-grid {
		font-size: 0.9em;
	}

	.kkc-calendar .kkc-grid .kkc-wd {
		background: #e8e8e8 !important;
		color: #000 !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}

/* ------------------------------------------------- 凡例だけを単体で置くとき */

/*
 * [koyomi_legend] で本文中に置いた場合。
 * 見出し（h3 など）のすぐ下に来るので、
 * カレンダー内に置くときの区切り線と上の余白はいらない。
 */

.kkc-calendar.kkc-standalone {
	margin: 0.6em 0 1.8em;
}

.kkc-calendar .kkc-legend--plain {
	padding: 0;
	border: 0;
	margin: 0;
	background: none;
}

.kkc-calendar .kkc-legend--plain .kkc-legend__body {
	padding-top: 0;
}

/* ------------------------------------------------- カレンダー上の「今日」の1行 */

/*
 * 月見出しより前に出る、その日の六曜・旧暦・月齢。
 * 主役は下のカレンダーなので、小さく静かに置く。
 * テーマが p に当てている行の高さ・余白・字下げを打ち消す。
 */

.kkc-calendar .kkc-today {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: baseline !important;
	gap: 0 0.1em !important;
	padding: 0 0 0.5em !important;
	border: 0 !important;
	margin: 0 0 0.2em !important;
	background: none !important;
	color: var(--kkc-muted) !important;
	font-size: 0.85em !important;
	line-height: 1.7 !important;
	text-indent: 0 !important;
}

.kkc-calendar .kkc-today::before,
.kkc-calendar .kkc-today::after {
	content: none !important;
	display: none !important;
}

.kkc-calendar .kkc-today__date {
	margin-right: 0.15em;
}

.kkc-calendar .kkc-today__wd--sun {
	color: var(--kkc-sun);
}

.kkc-calendar .kkc-today__wd--sat {
	color: var(--kkc-sat);
}

.kkc-calendar .kkc-today__item strong {
	margin-left: 0.15em;
	color: var(--kkc-navy);
	font-weight: 700;
}

.kkc-calendar .kkc-today__sep {
	margin: 0 0.1em;
}

/* 節気・祝日などのバッジは、文字の並びから少し離す */
.kkc-calendar .kkc-today__notes {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.3em;
	margin-left: 0.5em;
}

@media screen and (max-width: 560px) {

	.kkc-calendar .kkc-today {
		font-size: 0.8em !important;
		line-height: 1.8 !important;
	}

	/* スマホでは折り返すので、日付だけ行を分ける */
	.kkc-calendar .kkc-today__date {
		flex: 1 0 100%;
		margin-right: 0;
	}

	.kkc-calendar .kkc-today__notes {
		margin-left: 0.3em;
	}
}

/* ------------------------------------------- スマホの見出し行を1行に収める */

@media screen and (max-width: 560px) {

	/*
	 * 記念日リンクが折り返して1行まるごと使っていた。
	 * 月見出しの右に置いたまま収めるため、
	 * 和暦・和風月名を見出しの中で改行させて左の幅を詰める。
	 * これで見出し行が3行から2行になる。
	 */

	.kkc-calendar .kkc-head {
		flex-wrap: nowrap !important;
		align-items: center !important;
		gap: 0.3em 0.5em !important;
	}

	.kkc-calendar .kkc-head .kkc-month {
		flex: 1 1 auto !important;
		min-width: 0 !important;
		font-size: 1.2em !important;
		line-height: 1.25 !important;
	}

	.kkc-calendar .kkc-head .kkc-month .kkc-month__main {
		white-space: nowrap !important;
	}

	.kkc-calendar .kkc-head .kkc-month .kkc-wafu {
		display: block !important;
		margin-left: 0 !important;
		font-size: 0.62em !important;
		line-height: 1.3 !important;
		white-space: nowrap !important;
	}

	.kkc-calendar .kkc-head .kkc-anniv {
		flex: 0 0 auto !important;
		height: 2.4em !important;
		padding: 0 0.85em !important;
		font-size: 0.74em !important;
	}
}
