.ftf-cal {
	--ftf-green: #2F5D3A;
	--ftf-green-soft: #DCE8DE;
	--ftf-frost: #7FA7C4;
	--ftf-frost-bg: #EAF2F8;
	--ftf-harvest: #E9B949;
	--ftf-text: #1F2A24;
	--ftf-muted: #5B6660;
	--ftf-border: #E3DED3;
	box-sizing: border-box;
	max-width: 960px;
	margin: 0 auto 2rem;
	padding: 24px;
	background: #FFFFFF;
	border: 1px solid var(--ftf-border);
	border-radius: 12px;
	color: var(--ftf-text);
	font-size: 16px;
	line-height: 1.5;
}
.ftf-cal *, .ftf-cal *::before, .ftf-cal *::after { box-sizing: inherit; }
.ftf-cal p { margin: 0; padding: 0; }
.ftf-cal [hidden] { display: none !important; }
.ftf-cal.is-loading .ftf-finder__button { opacity: 0.7; cursor: progress; }

.ftf-cal__crops { margin-top: 18px; }
.ftf-cal__group { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.ftf-cal__legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 8px; }
.ftf-cal__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ftf-chip { position: relative; display: inline-flex; cursor: pointer; }
.ftf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ftf-chip span {
	display: inline-block;
	padding: 6px 12px;
	font-size: 14px;
	border: 1px solid var(--ftf-border);
	border-radius: 999px;
	background: #FFFFFF;
	color: var(--ftf-text);
}
.ftf-chip input:checked + span { background: var(--ftf-green); border-color: var(--ftf-green); color: #FFFFFF; }
.ftf-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(47, 93, 58, 0.25); }
.ftf-cal__option { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; font-size: 14px; color: var(--ftf-muted); cursor: pointer; }
.ftf-cal__option input { margin-top: 4px; accent-color: #2F5D3A; }

.ftf-cal__result { margin-top: 20px; }
.ftf-cal__head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--ftf-frost-bg); border: 1px solid var(--ftf-frost); border-radius: 8px; }
.ftf-cal__basis { font-size: 14px; font-weight: 600; }
.ftf-cal__print { padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--ftf-green); background: #FFFFFF; border: 1px solid var(--ftf-green); border-radius: 8px; cursor: pointer; }

.ftf-tl { margin-top: 18px; }
.ftf-tl__row { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 26px; }
.ftf-tl__name { font-size: 14px; }
.ftf-tl__axis, .ftf-tl__track { position: relative; height: 22px; }
.ftf-tl__track { background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 12 - 1px), var(--ftf-border) calc(100% / 12 - 1px), var(--ftf-border) calc(100% / 12)); border-bottom: 1px solid var(--ftf-border); }
.ftf-tl__month { position: absolute; top: 0; font-size: 12px; color: var(--ftf-muted); text-align: center; }
.ftf-tl__bar { position: absolute; top: 5px; height: 12px; border-radius: 6px; }
.ftf-tl__bar--indoor { background: var(--ftf-frost); }
.ftf-tl__bar--out { background: var(--ftf-green); }
.ftf-tl__bar--harvest { background: var(--ftf-harvest); }
.ftf-tl__bar--fall { background: var(--ftf-green-soft); border: 2px solid var(--ftf-green); }
.ftf-tl__legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 13px; color: var(--ftf-muted); }
.ftf-tl__key { display: inline-flex; align-items: center; gap: 6px; }
.ftf-tl__swatch { position: static; display: inline-block; width: 18px; height: 10px; border-radius: 5px; }

.ftf-cal__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 20px; }
.ftf-crop { padding: 14px 16px; border: 1px solid var(--ftf-border); border-radius: 8px; break-inside: avoid; }
.ftf-crop__name { font-size: 18px; font-weight: 600; color: var(--ftf-green); margin-bottom: 6px !important; }
.ftf-crop__dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.ftf-crop__dl dt { color: var(--ftf-muted); margin: 0; }
.ftf-crop__dl dd { margin: 0; font-weight: 600; white-space: nowrap; }
.ftf-crop__dl dd.is-text { white-space: normal; }
.ftf-crop__warn { margin-top: 8px !important; font-size: 13px; color: #854F0B; background: #FAEEDA; padding: 6px 10px; border-radius: 6px; }
.ftf-cal .ftf-msg { margin-top: 14px !important; font-size: 15px; }
.ftf-cal .ftf-meta { margin-top: 14px !important; font-size: 13px; color: var(--ftf-muted); }

@media (max-width: 600px) {
	.ftf-cal { padding: 18px; }
	.ftf-cal .ftf-finder__button { flex: 1 1 100%; }
	.ftf-tl__row { grid-template-columns: 78px minmax(0, 1fr); gap: 6px; }
	.ftf-tl__name { font-size: 12px; }
	.ftf-tl__month { font-size: 0; }
	.ftf-tl__month::after { content: attr(data-short); font-size: 11px; }
	.ftf-crop__dl { grid-template-columns: 1fr; gap: 0; }
	.ftf-crop__dl dd { margin-bottom: 6px; }
}

@media print {
	.ftf-cal { border: 0; padding: 0; max-width: none; }
	.ftf-cal .ftf-finder__form, .ftf-cal__print { display: none !important; }
	.ftf-tl__bar, .ftf-tl__swatch { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
