@charset "utf-8";

/* 大きな金額用の明朝体（読み込めない環境では、端末の明朝体になります） */
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@600;700&display=swap');

/*---------------------
	家計簿
	※色は main.css の変数（--ranungreen など）を使っています
----------------------*/

/* サブナビ：まだ作っていない画面は薄く表示 */
.kk-subnav .cal-subnav-item.is-disabled{
	opacity: 0.4;
	pointer-events: none;
}

/* 月の切り替え */
.kk-monthbar{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.2em;
	margin-bottom: 1em;
}
.kk-monthbar-title{
	font-weight: bold;
	color: var(--ranunbrown);
	min-width: 6.5em;
	text-align: center;
}

/* 金額表示のオンオフ（スイッチ） */
.kk-switch-row{
	display: flex;
	justify-content: flex-end;
	margin-bottom: 0.8em;
}
.kk-switch{
	display: inline-flex;
	align-items: center;
	gap: 0.8em;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.kk-switch-label{
	font-weight: bold;
	color: var(--ranunbrown);
	font-size: 1em;
}
.kk-switch input{
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.kk-switch-track{
	position: relative;
	flex: none;
	width: 3.8em;
	height: 2.1em;
	border-radius: 2em;
	background-color: var(--ranungray);
	transition: background-color .25s;
}
.kk-switch-track::after{
	content: '';
	position: absolute;
	top: 0.2em;
	left: 0.2em;
	width: 1.7em;
	height: 1.7em;
	border-radius: 50%;
	background: white;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
	transition: transform .25s;
}
.kk-switch input:checked + .kk-switch-track{
	background-color: var(--ranunpink);
}
.kk-switch input:checked + .kk-switch-track::after{
	transform: translateX(1.7em);
}
.kk-switch input:focus-visible + .kk-switch-track{
	outline: solid 2px var(--ranungreen2);
	outline-offset: 2px;
}

/* 金額の表示オンオフ（初期は ＊＊＊＊ を表示） */
.kk-secret .kk-real{ display: none; }
.kk-secret .kk-mask{ display: inline; letter-spacing: 0.05em; }
body.kk-reveal .kk-secret .kk-real{ display: inline; }
body.kk-reveal .kk-secret .kk-mask{ display: none; }

/* カード */
.kk-card{
	background-color: rgba(161, 219, 141, 0.18);
	border-radius: 1em;
	padding: 1em 1.2em;
	margin-bottom: 1em;
}
.kk-card--hero{
	background-color: rgba(161, 219, 141, 0.32);
	padding: 1.3em 1.2em;
}
.kk-card--saving{
	background-color: rgba(255, 181, 180, 0.3);
}
.kk-card-label{
	font-weight: bold;
	color: var(--ranunbrown);
	font-size: 0.9em;
}
.kk-card-label i{
	color: var(--ranungreen2);
	margin-right: 0.3em;
}
.kk-card--saving .kk-card-label i{
	color: var(--ranunred);
}
.kk-card-note{
	font-size: 0.75em;
	color: #8a8a8a;
	line-height: 1.6;
	margin-top: 0.5em;
}

/* 金額（大きく・読みやすく） */
.kk-hero-amount,
.kk-big-amount{
	font-family: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', 'Noto Serif JP', 'MS PMincho', serif;
}
.kk-hero-amount{
	font-size: 2.4em;
	font-weight: bold;
	color: var(--ranungreen2);
	line-height: 1.3;
	margin: 0.1em 0;
	font-variant-numeric: tabular-nums;
}
.kk-big-amount{
	font-size: 1.8em;
	font-weight: bold;
	color: var(--ranunbrown);
	line-height: 1.4;
	font-variant-numeric: tabular-nums;
}
.kk-big-amount--sub{
	font-size: 1.6em;
}

/* 前月比 */
.kk-compare{
	font-size: 0.85em;
	color: #8a8a8a;
}
.kk-compare--up{ color: var(--ranunred); font-weight: bold; }
.kk-compare--down{ color: var(--ranungreen2); font-weight: bold; }
.kk-compare-prev{
	display: block;
	font-weight: normal;
	color: #8a8a8a;
	font-size: 0.9em;
	margin-top: 0.1em;
}

/* 口座リスト */
.kk-account-list{
	list-style: none;
	margin-top: 0.6em;
	font-size: 0.9em;
}
.kk-account-list li{
	display: flex;
	justify-content: space-between;
	padding: 0.3em 0;
	border-bottom: dashed 1px var(--ranungray);
	font-variant-numeric: tabular-nums;
}
.kk-account-list li:last-child{
	border-bottom: none;
}

/* 支払い方法別のバー */
.kk-bar-row{
	margin-top: 0.8em;
}
.kk-bar-head{
	display: flex;
	justify-content: space-between;
	font-size: 0.9em;
	font-variant-numeric: tabular-nums;
}
.kk-bar-head small{
	color: #8a8a8a;
	margin-left: 0.4em;
}
.kk-bar{
	height: 0.6em;
	background: white;
	border-radius: 1em;
	overflow: hidden;
	margin-top: 0.25em;
}
.kk-bar-fill{
	height: 100%;
	border-radius: 1em;
	background-color: var(--ranungreen);
}
.kk-bar-fill--subscription{ background-color: #c8b6e8; }
.kk-bar-fill--cash{ background-color: var(--ranungreen); }
.kk-bar-fill--electronic{ background-color: var(--ranunpink); }

/* 入力フォーム：支出／収入／貯金の切り替え */
.kk-seg{
	display: flex;
	background: var(--ranuncream);
	border-radius: 2em;
	padding: 0.25em;
	gap: 0.25em;
}
.kk-seg-item{
	flex: 1;
	text-align: center;
	cursor: pointer;
}
.kk-seg-item input{
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.kk-seg-item span{
	display: block;
	padding: 0.5em 0;
	border-radius: 2em;
	color: var(--ranunbrown);
	font-size: 0.95em;
}
.kk-seg-item input:checked + span{
	background-color: var(--ranungreen);
	color: white;
	font-weight: bold;
}
.kk-amount-input{
	font-size: 1.6em;
	font-weight: bold;
	font-variant-numeric: tabular-nums;
}
[hidden]{
	display: none !important;
}

/*---------------------
	明細
----------------------*/
.kk-filter{
	display: flex;
	gap: 0.4em;
	background: var(--ranuncream);
	border-radius: 2em;
	padding: 0.25em;
	margin-bottom: 1em;
}
.kk-filter-item{
	flex: 1;
	text-align: center;
	padding: 0.45em 0;
	border-radius: 2em;
	font-size: 0.85em;
	color: var(--ranunbrown);
}
.kk-filter-item.is-current{
	background-color: var(--ranungreen);
	color: white;
	font-weight: bold;
}
.kk-card--compact{
	padding: 1em 1.2em;
}
.kk-hero-amount--sm{
	font-size: 2em;
}

/* 明細の行 */
.kk-list-head{
	font-size: 0.85em;
	font-weight: bold;
	color: var(--ranunbrown);
	margin: 1.2em 0 0.3em;
}
.kk-row{
	display: flex;
	align-items: center;
	gap: 0.7em;
	padding: 0.7em 0;
	border-bottom: dashed 1px var(--ranungray);
	color: var(--ranunbrown);
}
.kk-row-date{
	flex: none;
	width: 3.4em;
	font-size: 0.8em;
	line-height: 1.3;
	color: #8a8a8a;
	font-variant-numeric: tabular-nums;
}
.kk-row-date small{
	display: block;
	font-size: 0.85em;
}
.kk-row-icon{
	flex: none;
	width: 2.3em;
	height: 2.3em;
	border-radius: 50%;
	background-color: rgba(161, 219, 141, 0.3);
	color: var(--ranungreen2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9em;
}
.kk-row--saving .kk-row-icon{
	background-color: rgba(255, 181, 180, 0.4);
	color: var(--ranunred);
}
.kk-row-body{
	flex: 1;
	min-width: 0;
}
.kk-row-title{
	display: block;
	font-size: 0.95em;
	font-weight: bold;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.kk-row-flag{
	color: #b5a3d9;
	margin-left: 0.4em;
	font-size: 0.8em;
}
.kk-row-sub{
	display: block;
	font-size: 0.75em;
	color: #8a8a8a;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.kk-row-amount{
	flex: none;
	font-weight: bold;
	font-size: 0.95em;
	font-variant-numeric: tabular-nums;
}
.kk-row--income .kk-row-amount{
	color: var(--ranungreen2);
}
.kk-row--saving .kk-row-amount{
	color: var(--ranunred);
}

/* サブスク */
.kk-sub-summary{
	display: flex;
	gap: 1em;
	margin: 0.6em 0;
}
.kk-sub-summary > div{
	flex: 1;
	background: white;
	border-radius: 0.8em;
	padding: 0.5em 0.8em;
}
.kk-sub-summary small{
	display: block;
	font-size: 0.72em;
	color: #8a8a8a;
}
.kk-sub-summary strong{
	font-size: 1.15em;
	color: var(--ranunbrown);
	font-variant-numeric: tabular-nums;
}
.kk-sub-list{
	list-style: none;
}
.kk-sub-list li{
	display: flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.7em 0;
	border-bottom: dashed 1px var(--ranungray);
}
.kk-sub-list li:last-child{
	border-bottom: none;
}
.kk-sub-list li.is-inactive{
	opacity: 0.55;
}
.kk-sub-main{
	flex: 1;
	min-width: 0;
	color: var(--ranunbrown);
}
.kk-sub-name{
	display: block;
	font-weight: bold;
	font-size: 0.95em;
}
.kk-sub-name em{
	font-style: normal;
	font-size: 0.7em;
	margin-left: 0.5em;
	padding: 0.1em 0.6em;
	border-radius: 1em;
	background: var(--ranungray);
	color: white;
}
.kk-sub-meta{
	display: block;
	font-size: 0.72em;
	color: #8a8a8a;
}
.kk-sub-price{
	flex: none;
	text-align: right;
	font-variant-numeric: tabular-nums;
}
.kk-sub-price strong{
	font-size: 0.95em;
	color: var(--ranunbrown);
}
.kk-sub-price small{
	font-size: 0.75em;
	font-weight: normal;
}
.kk-sub-record{
	flex: none;
	width: 2em;
	height: 2em;
	border-radius: 50%;
	background-color: var(--ranungreen);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85em;
}

/*---------------------
	カテゴリのアイコン選択
----------------------*/
.kk-icon-grid{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(2.8em, 1fr));
	gap: 0.4em;
}
.kk-icon-item{
	cursor: pointer;
}
.kk-icon-item input{
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.kk-icon-item span{
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	border-radius: 0.7em;
	background: var(--ranuncream);
	color: var(--ranunbrown);
	border: solid 2px transparent;
}
.kk-icon-item input:checked + span{
	background-color: rgba(161, 219, 141, 0.35);
	border-color: var(--ranungreen);
	color: var(--ranungreen2);
}

/*---------------------
	資産・貯金目標
----------------------*/
.kk-card-link{
	color: var(--ranungreen2);
	text-decoration: underline;
}
.kk-hero-amount--assets{
	font-size: 2.2em;
}
.kk-chips{
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	margin-top: 0.8em;
}
.kk-chip{
	background: white;
	border-radius: 2em;
	padding: 0.25em 0.8em;
	font-size: 0.78em;
	color: var(--ranunbrown);
}
.kk-chip i{
	color: var(--ranungreen2);
	margin-right: 0.2em;
}
.kk-row-amount.is-minus{
	color: var(--ranunred);
}

/* 貯金目標 */
.kk-goal{
	display: block;
	background: rgba(255, 181, 180, 0.2);
	border-radius: 1em;
	padding: 0.9em 1.1em;
	margin-bottom: 0.7em;
	color: var(--ranunbrown);
}
.kk-goal-head{
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-weight: bold;
}
.kk-goal-name i{
	color: var(--ranunred);
	margin-right: 0.3em;
}
.kk-goal-pct{
	font-size: 1.1em;
	font-variant-numeric: tabular-nums;
}
.kk-goal .kk-bar{
	margin: 0.5em 0;
}
.kk-goal-foot{
	display: flex;
	justify-content: space-between;
	font-size: 0.9em;
	font-variant-numeric: tabular-nums;
}
.kk-goal-foot small{
	color: #8a8a8a;
}
.kk-goal-meta{
	font-size: 0.75em;
	color: #8a8a8a;
	margin-top: 0.3em;
}
.kk-bar-fill--goal{
	background-color: var(--ranunpink);
}
.kk-bar-fill--goal.is-done{
	background-color: var(--ranungreen);
}

/* ホームの貯金カード内の目標 */
.kk-mini-goal{
	display: block;
	margin-top: 0.8em;
	color: var(--ranunbrown);
}
.kk-mini-goal-head{
	display: flex;
	justify-content: space-between;
	font-size: 0.82em;
}
.kk-mini-goal .kk-bar{
	display: block;
}
.kk-mini-goal .kk-bar-fill{
	display: block;
}

/*---------------------
	分析
----------------------*/
/* 棒グラフ（月別） */
.kk-chart{
	display: flex;
	align-items: flex-end;
	gap: 0.5em;
	height: 11em;
	margin-top: 0.8em;
}
.kk-chart-col{
	flex: 1;
	min-width: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 0.3em;
	color: var(--ranunbrown);
}
.kk-chart-val{
	font-size: 0.65em;
	color: #8a8a8a;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.kk-chart-bar{
	width: 100%;
	flex: 1;
	display: flex;
	align-items: flex-end;
}
.kk-chart-bar span{
	display: block;
	width: 100%;
	min-height: 0;
	border-radius: 0.5em 0.5em 0.2em 0.2em;
	background-color: rgba(161, 219, 141, 0.55);
}
.kk-chart-col.is-selected .kk-chart-bar span{
	background-color: var(--ranungreen);
}
.kk-chart-col.is-selected .kk-chart-val{
	color: var(--ranungreen2);
	font-weight: bold;
}
.kk-chart-label{
	font-size: 0.75em;
}
.kk-chart-col.is-selected .kk-chart-label{
	font-weight: bold;
	color: var(--ranungreen2);
}

/* ドーナツグラフ */
.kk-donut-wrap{
	display: flex;
	justify-content: center;
	margin: 0.8em 0 0.2em;
}
.kk-donut{
	width: 11em;
	height: 11em;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.kk-donut-hole{
	width: 6.6em;
	height: 6.6em;
	border-radius: 50%;
	background: white;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	line-height: 1.3;
}
.kk-donut-hole small{
	font-size: 0.7em;
	color: #8a8a8a;
}
.kk-donut-hole strong{
	font-family: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', 'Noto Serif JP', 'MS PMincho', serif;
	font-size: 1.15em;
	color: var(--ranunbrown);
}

/* 内訳の行 */
.kk-legend-row{
	display: flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.6em 0;
	border-bottom: dashed 1px var(--ranungray);
	font-size: 0.9em;
	font-variant-numeric: tabular-nums;
}
.kk-legend-row.is-zero{
	opacity: 0.55;
}
.kk-legend-dot{
	flex: none;
	width: 0.9em;
	height: 0.9em;
	border-radius: 50%;
}
.kk-legend-name{
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.kk-legend-pct{
	flex: none;
	color: #8a8a8a;
	font-size: 0.85em;
	width: 3.2em;
	text-align: right;
}
.kk-legend-amount{
	flex: none;
	font-weight: bold;
	min-width: 5em;
	text-align: right;
}
.kk-diff{
	flex: none;
	font-size: 0.72em;
	min-width: 5.4em;
	text-align: right;
}
.kk-diff--up{ color: var(--ranunred); font-weight: bold; }
.kk-diff--down{ color: var(--ranungreen2); font-weight: bold; }
.kk-diff--flat{ color: #8a8a8a; }
.kk-insight{
	margin-top: 0.4em;
	font-size: 0.92em;
}
.kk-insight--up i{ color: var(--ranunred); }
.kk-insight--down i{ color: var(--ranungreen2); }

/*---------------------
	CSV取り込み
----------------------*/
.kk-steps{
	display: flex;
	list-style: none;
	gap: 0.5em;
	justify-content: center;
	margin-bottom: 1.2em;
	font-size: 0.8em;
	color: #8a8a8a;
}
.kk-steps li{
	display: flex;
	align-items: center;
	gap: 0.4em;
}
.kk-steps li + li::before{
	content: '';
	width: 1.5em;
	height: 2px;
	background: var(--ranungray);
	margin-right: 0.5em;
}
.kk-steps li span{
	width: 1.8em;
	height: 1.8em;
	border-radius: 50%;
	background: var(--ranungray);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
}
.kk-steps li.is-current{ color: var(--ranunbrown); font-weight: bold; }
.kk-steps li.is-current span{ background: var(--ranungreen); }
.kk-steps li.is-done span{ background: var(--ranungreen2); }

.kk-preview-scroll{
	overflow-x: auto;
	border-radius: 0.8em;
	border: solid 1px var(--ranungray);
}
.kk-preview-table{
	border-collapse: collapse;
	font-size: 0.75em;
	white-space: nowrap;
	width: 100%;
}
.kk-preview-table td{
	padding: 0.4em 0.7em;
	border-bottom: dashed 1px var(--ranungray);
}
.kk-preview-table tr.is-head td{
	background: var(--ranuncream);
	font-weight: bold;
}
.kk-radio-stack{
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	font-size: 0.88em;
}

.kk-import-summary{
	display: flex;
	gap: 0.6em;
	text-align: center;
}
.kk-import-summary > div{
	flex: 1;
	background: white;
	border-radius: 0.8em;
	padding: 0.5em 0.2em;
}
.kk-import-summary strong{
	display: block;
	font-size: 1.4em;
	color: var(--ranungreen2);
	font-variant-numeric: tabular-nums;
	line-height: 1.3;
}
.kk-import-summary small{
	font-size: 0.68em;
	color: #8a8a8a;
}
.kk-import-summary .is-warn strong{
	color: var(--ranunred);
}

.kk-import-list{
	margin-bottom: 0.5em;
}
.kk-import-row{
	display: flex;
	gap: 0.6em;
	padding: 0.7em 0;
	border-bottom: dashed 1px var(--ranungray);
}
.kk-import-row.is-off{
	opacity: 0.5;
}
.kk-import-row.is-error{
	background: rgba(218, 115, 111, 0.08);
}
.kk-import-check{
	flex: none;
	padding-top: 0.2em;
}
.kk-import-check input{
	width: 1.3em;
	height: 1.3em;
	accent-color: var(--ranungreen2);
}
.kk-import-body{
	flex: 1;
	min-width: 0;
}
.kk-import-top{
	display: flex;
	align-items: baseline;
	gap: 0.6em;
}
.kk-import-date{
	flex: none;
	font-size: 0.78em;
	color: #8a8a8a;
	font-variant-numeric: tabular-nums;
}
.kk-import-title{
	flex: 1;
	min-width: 0;
	font-weight: bold;
	font-size: 0.92em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.kk-import-amount{
	flex: none;
	font-weight: bold;
	font-size: 0.95em;
	font-variant-numeric: tabular-nums;
}
.kk-import-amount--income{ color: var(--ranungreen2); }
.kk-import-bottom{
	margin-top: 0.4em;
}
.kk-import-cat{
	width: 100%;
	font-size: 0.82em;
	padding: 0.35em 0.5em;
	border: solid 2px var(--ranungreen);
	border-radius: 0.6em;
	color: var(--ranunbrown);
	background: white;
}
.kk-import-cat.is-uncat{
	border-color: var(--ranunpink);
	background: rgba(255, 181, 180, 0.12);
}
.kk-badges{
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em;
	margin-top: 0.35em;
}
.kk-badge{
	font-size: 0.68em;
	padding: 0.1em 0.7em;
	border-radius: 1em;
	background: var(--ranuncream);
	color: var(--ranunbrown);
}
.kk-badge--err{ background: rgba(218, 115, 111, 0.18); color: var(--ranunbordeaux); }
.kk-badge--warn{ background: rgba(255, 224, 138, 0.5); }
.kk-badge--sub{ background: rgba(200, 182, 232, 0.4); }
.kk-badge--income{ background: rgba(161, 219, 141, 0.35); color: var(--ranungreen2); }
.kk-import-actions{
	display: flex;
	justify-content: center;
	gap: 1.5em;
	margin: 0.8em 0 1em;
}
.kk-link-button{
	background: none;
	color: var(--ranungreen2);
	font-size: 0.85em;
	text-decoration: underline;
	cursor: pointer;
}
button.kk-filter-item{
	background: none;
	font-family: inherit;
	cursor: pointer;
}
button.kk-filter-item.is-current{
	background-color: var(--ranungreen);
}

/*---------------------
	バックアップ
----------------------*/
.kk-dl{
	display: flex;
	flex-direction: column;
	gap: 0.7em;
}
.kk-dl-item{
	display: flex;
	align-items: center;
	gap: 0.9em;
	background: rgba(161, 219, 141, 0.18);
	border-radius: 1em;
	padding: 0.9em 1.1em;
	color: var(--ranunbrown);
}
.kk-dl-item > i{
	font-size: 1.5em;
	color: var(--ranungreen2);
	flex: none;
}
.kk-dl-item span{
	flex: 1;
	min-width: 0;
}
.kk-dl-item strong{
	display: block;
	font-size: 0.95em;
}
.kk-dl-item small{
	display: block;
	font-size: 0.72em;
	color: #8a8a8a;
	line-height: 1.5;
}
.kk-dl-go{
	flex: none;
	width: 2.4em;
	height: 2.4em;
	border-radius: 50%;
	background: var(--ranungreen);
	color: white;
	cursor: pointer;
}
.kk-file{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8em;
	padding: 0.6em 0;
	border-bottom: dashed 1px var(--ranungray);
}
.kk-file-main strong{
	font-size: 0.92em;
	font-variant-numeric: tabular-nums;
}
.kk-file-main small{
	margin-left: 0.6em;
	color: #8a8a8a;
	font-size: 0.75em;
}
.kk-file-actions{
	display: flex;
	align-items: center;
	gap: 0.9em;
}
.kk-file-actions a,
.kk-file-actions button{
	color: var(--ranungreen2);
	background: none;
	cursor: pointer;
	font-size: 1em;
}
.kk-file-actions button.is-del{
	color: var(--ranunred);
}
.kk-details{
	margin-top: 1em;
	font-size: 0.85em;
}
.kk-details summary{
	cursor: pointer;
	color: var(--ranungreen2);
	font-weight: bold;
}
.kk-details ol{
	margin: 0.6em 0 0 1.4em;
	line-height: 1.7;
	list-style: decimal outside;
}
.kk-code{
	margin-top: 0.3em;
	padding: 0.5em 0.7em;
	background: #f4f4f4;
	border-radius: 0.5em;
	font-family: monospace;
	font-size: 0.8em;
	word-break: break-all;
}
.kk-restore-table{
	width: 100%;
	margin: 0.6em 0;
	border-collapse: collapse;
	font-size: 0.88em;
	font-variant-numeric: tabular-nums;
}
.kk-restore-table th{
	font-size: 0.8em;
	color: #8a8a8a;
	text-align: right;
	padding-bottom: 0.3em;
}
.kk-restore-table td{
	padding: 0.35em 0;
	border-bottom: dashed 1px var(--ranungray);
}
.kk-restore-table td + td{
	text-align: right;
}

/*---------------------
	予算
----------------------*/
a.kk-card{
	display: block;
	color: var(--ranunbrown);
}
.kk-card--budget{
	background-color: rgba(205, 232, 255, 0.35);
}
.kk-card--budget .kk-card-label i{
	color: var(--ranungreen2);
}

/* 予算バー（色だけに頼らず、数字や「オーバー」の文字も出しています） */
.kk-budget-bar{
	position: relative;
	height: 0.9em;
	background: white;
	border-radius: 1em;
	margin-top: 0.6em;
	overflow: visible;
}
.kk-budget-bar--sm{
	height: 0.65em;
	margin-top: 0.4em;
}
.kk-budget-fill{
	height: 100%;
	border-radius: 1em;
	background-color: var(--ranungreen);
}
.kk-budget-bar--warn .kk-budget-fill{ background-color: #f2c94c; }
.kk-budget-bar--over .kk-budget-fill{ background-color: var(--ranunred); }
.kk-budget-pace{
	position: absolute;
	top: -0.25em;
	bottom: -0.25em;
	width: 2px;
	margin-left: -1px;
	background: var(--ranunbrown);
	opacity: 0.55;
}
.kk-budget-big{
	display: flex;
	align-items: baseline;
	gap: 0.5em;
}
.kk-budget-big small{
	color: #8a8a8a;
	font-size: 0.9em;
	font-variant-numeric: tabular-nums;
}
.kk-budget-pct{
	font-size: 0.9em;
	font-weight: bold;
	margin-left: 0.4em;
	font-variant-numeric: tabular-nums;
}
.kk-budget-pct--ok{ color: var(--ranungreen2); }
.kk-budget-pct--warn{ color: #b8860b; }
.kk-budget-pct--over{ color: var(--ranunred); }

.kk-budget-item{
	padding: 0.7em 0;
	border-bottom: dashed 1px var(--ranungray);
}
.kk-budget-item-head{
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}
.kk-budget-item-name{
	font-weight: bold;
	font-size: 0.95em;
}
.kk-budget-item-name i{
	color: var(--ranungreen2);
	margin-right: 0.3em;
}
.kk-budget-item-foot{
	display: flex;
	justify-content: space-between;
	margin-top: 0.4em;
	font-size: 0.85em;
	font-variant-numeric: tabular-nums;
}
.kk-budget-item-foot small{ color: #8a8a8a; }
.kk-budget-rest--over{ color: var(--ranunred); font-weight: bold; }
.kk-budget-rest--ok{ color: #8a8a8a; }

/* 予算の入力画面 */
.kk-budget-row{
	display: flex;
	align-items: center;
	gap: 0.7em;
	padding: 0.7em 0;
	border-bottom: dashed 1px var(--ranungray);
}
.kk-budget-body{
	flex: 1;
	min-width: 0;
}
.kk-budget-name{
	font-weight: bold;
	font-size: 0.95em;
}
.kk-budget-ref{
	font-size: 0.72em;
	color: #8a8a8a;
	font-variant-numeric: tabular-nums;
}
.kk-budget-ref strong{
	color: var(--ranunbrown);
}
.kk-budget-input{
	flex: none;
	width: 7.5em;
	display: flex;
	align-items: center;
	gap: 0.2em;
	color: #8a8a8a;
}
.kk-budget-input input{
	text-align: right;
	padding: 0.45em 0.6em;
	font-variant-numeric: tabular-nums;
}
.kk-budget-total{
	display: flex;
	gap: 0.6em;
	margin: 1em 0 0.4em;
	text-align: center;
}
.kk-budget-total > div{
	flex: 1;
	background: var(--ranuncream);
	border-radius: 0.8em;
	padding: 0.5em 0.2em;
}
.kk-budget-total small{
	display: block;
	font-size: 0.68em;
	color: #8a8a8a;
}
.kk-budget-total strong{
	font-size: 0.95em;
	font-variant-numeric: tabular-nums;
}

/*---------------------
	予定との紐づけ
----------------------*/
.kk-row-link{
	display: block;
	font-size: 0.75em;
	color: var(--ranungreen2);
	margin-top: 0.1em;
}
.kk-sched-total{
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 0.7em 0.2em 0;
	color: var(--ranunbrown);
}
.kk-sched-total strong{
	font-size: 1.2em;
}
.kk-sched-total--sub{
	padding-top: 0.3em;
	font-size: 0.9em;
}
.kk-filter--scroll{
	overflow-x: auto;
	scrollbar-width: none;
}
.kk-filter--scroll::-webkit-scrollbar{
	display: none;
}
.kk-filter--scroll .kk-filter-item{
	flex: 1 0 auto;
	padding-left: 0.9em;
	padding-right: 0.9em;
	white-space: nowrap;
}
