/**
 * 今が旬の野菜カレンダー（[picolabo_yasai_shun]）。1rem = 10px。
 *
 * 野菜のアイコンはクイズと同じ線画（淡い黄緑のタイルに白い丸）。色は黒を基本に、
 * 「旬」を黄緑、「値ごろ」を青、店頭価格の平年比は安いと黄緑・高いとコーラルにする。
 */

.ys {
	--ys-bar: #d7e3c9;
	--ys-shun: #7ed321;
	--ys-low: var(--c-lime-ink);
	--ys-high: var(--c-coral-ink);
}

.ys-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

.ys-block {
	max-width: 1000px;
	margin: 0 auto;
}

.ys-block + .ys-block {
	margin-top: clamp(48px, 7vw, 80px);
}

.ys-block__head {
	margin-bottom: 18px;
}

.pt .ys-h2 {
	display: flex;
	align-items: baseline;
	gap: 4px;
	margin: 0;
	font-size: clamp(1.9rem, 2.4vw, 2.2rem);
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.04em;
}

.ys-h2__num {
	font-family: var(--font-en);
	font-size: 1.4em;
	font-weight: 600;
	line-height: 1;
}

.pt .ys-block__sub {
	margin-top: 4px;
	color: var(--c-ink-3);
	font-size: 1.3rem;
}

/* Icon（クイズのカードと同じ形） */
.ys-icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 52px;
	aspect-ratio: 1;
	border-radius: 12px;
	background: var(--c-tint-lime);
}

.ys-icon__badge {
	display: grid;
	place-items: center;
	width: 66%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 6px 14px rgba(30, 35, 40, 0.07);
	rotate: -6deg;
}

.ys :is(.ys-icon__badge, .ys-picker__icon) svg {
	width: 58%;
	height: 58%;
	fill: none;
	stroke: #5fae14;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ys-icon--small {
	width: 34px;
	border-radius: 9px;
}

.ys-tag {
	display: inline-flex;
	align-items: center;
	padding: 1px 8px;
	border-radius: 999px;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.ys-tag--shun {
	background: var(--c-tint-lime);
	color: var(--c-lime-ink);
}

.ys-tag--cheap {
	background: var(--c-tint-blue);
	color: var(--c-blue-ink);
}

/* Month tabs and lists
   -------------------------------------------------------------------------- */
.ys-months {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 6px;
	margin-bottom: 24px;
	padding: 6px;
	border-radius: 999px;
	background: var(--c-tint);
}

.pt .ys-months__btn {
	min-height: 42px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--c-ink-2);
	font: 600 1.6rem/1 var(--font-en);
	cursor: pointer;
	transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.ys-months__btn span {
	margin-left: 1px;
	font-family: var(--font-ja);
	font-size: 1.1rem;
	font-weight: 500;
}

.pt .ys-months__btn:hover {
	color: var(--c-ink);
}

.pt .ys-months__btn[aria-selected="true"] {
	background: var(--c-ink);
	color: #fff;
}

.ys-panel__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.pt .ys-panel__count {
	color: var(--c-ink-3);
	font-size: 1.3rem;
	white-space: nowrap;
}

.pt .ys-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
	gap: 12px;
}

.pt .ys-card {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	height: 100%;
	padding: 14px;
	border: 0;
	border-radius: var(--radius);
	background: #fff;
	box-shadow: 0 0 0 1px var(--c-line);
	color: var(--c-ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.pt .ys-card:hover {
	box-shadow: 0 0 0 1px var(--c-line), var(--shadow);
	transform: translateY(-2px);
}

.ys-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.ys-card__name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.4;
}

.ys-card__origin {
	color: var(--c-ink-3);
	font-size: 1.15rem;
	line-height: 1.4;
}

.ys-spark {
	display: block;
	width: 117px;
	height: 24px;
}

.ys-spark rect,
.ys-legend__bars rect {
	fill: var(--ys-bar);
}

.ys-spark rect.is-shun,
.ys-legend__bars rect.is-shun {
	fill: var(--ys-shun);
}

.ys-spark rect.is-now,
.ys-legend__bars rect.is-now {
	fill: var(--c-ink);
}

.pt .ys-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin-top: 16px;
	color: var(--c-ink-3);
	font-size: 1.2rem;
}

.ys-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.ys-legend__bars {
	width: 27px;
	height: 12px;
}

/* Weekly retail price
   -------------------------------------------------------------------------- */
.ys-price__list {
	display: grid;
	gap: 0;
	border-top: 1px solid var(--c-line);
}

.ys-price__row {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr) 190px 90px;
	align-items: center;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px solid var(--c-line);
}

.pt .ys-price__veg {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--c-ink);
	font: 700 1.5rem/1.4 var(--font-ja);
	text-align: left;
	cursor: pointer;
}

.pt .ys-price__veg:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* 平年（100%）を真ん中に置き、安いと左、高いと右へのびる棒。 */
.ys-price__bar {
	position: relative;
	height: 10px;
	border-radius: 999px;
	background: var(--c-tint);
}

.ys-price__bar::after {
	content: "";
	position: absolute;
	top: -4px;
	bottom: -4px;
	left: 50%;
	width: 2px;
	background: var(--c-ink-3);
}

.ys-price__fill {
	--ratio: 100;
	position: absolute;
	top: 0;
	bottom: 0;
	border-radius: 999px;
}

.ys-price__row--low .ys-price__fill {
	right: 50%;
	width: calc((100 - var(--ratio)) * 0.5%);
	background: var(--ys-shun);
}

.ys-price__row--high .ys-price__fill {
	left: 50%;
	width: calc((var(--ratio) - 100) * 0.5%);
	background: var(--c-coral);
}

.ys-price__row--even .ys-price__fill {
	left: calc(50% - 4px);
	width: 8px;
	background: var(--c-ink-3);
}

.ys-price__ratio {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: 1.3rem;
	font-weight: 700;
}

.ys-price__ratio b {
	font-family: var(--font-en);
	font-size: 1.8rem;
	font-weight: 600;
}

.ys-price__row--low .ys-price__ratio {
	color: var(--ys-low);
}

.ys-price__row--high .ys-price__ratio {
	color: var(--ys-high);
}

.ys-price__yen {
	color: var(--c-ink-3);
	font-size: 1.2rem;
	text-align: right;
}

.pt .ys-note {
	margin-top: 10px;
	color: var(--c-ink-3);
	font-size: 1.2rem;
}

/* Detail
   -------------------------------------------------------------------------- */
.ys-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 20px;
}

.pt .ys-picker__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 0 12px 0 6px;
	border: 1px solid var(--c-line-2);
	border-radius: 999px;
	background: #fff;
	color: var(--c-ink);
	font: 500 1.3rem/1 var(--font-ja);
	cursor: pointer;
	transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.ys-picker__icon {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--c-tint-lime);
}

.ys .ys-picker__icon svg {
	width: 70%;
	height: 70%;
}

.pt .ys-picker__btn:hover {
	border-color: var(--c-ink);
}

.pt .ys-picker__btn[aria-pressed="true"] {
	border-color: var(--c-ink);
	background: var(--c-ink);
	color: #fff;
}

.ys-d {
	padding: clamp(20px, 3vw, 32px);
	border-radius: var(--radius);
	background: #fff;
	box-shadow: 0 0 0 1px var(--c-line), var(--shadow);
}

.ys-d__head {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.ys-d .ys-icon {
	width: 64px;
	border-radius: 14px;
}

.pt .ys-d__name {
	margin: 0;
	font-size: clamp(2.2rem, 3vw, 2.6rem);
	font-weight: 700;
	line-height: 1.4;
}

.pt .ys-d__shun {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	font-size: 1.4rem;
	font-weight: 700;
}

.pt .ys-d__summary,
.pt .ys-d__relay-text {
	color: var(--c-ink-2);
	font-size: 1.5rem;
	line-height: 1.9;
}

.ys-d__stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
	gap: 10px;
	margin-top: 18px;
}

.ys-stat {
	padding: 12px 14px;
	border-radius: var(--radius-s);
	background: var(--c-tint);
}

.pt .ys-stat__label {
	color: var(--c-ink-3);
	font-size: 1.2rem;
	font-weight: 700;
}

.pt .ys-stat__value {
	margin-top: 2px;
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.5;
}

.pt .ys-stat__note {
	color: var(--c-ink-3);
	font-size: 1.15rem;
}

.pt .ys-d__h4 {
	margin: 28px 0 10px;
	padding-top: 20px;
	border-top: 1px solid var(--c-line);
	font-size: 1.6rem;
	font-weight: 700;
}

.ys-d__chart svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.ys-chart__bar {
	fill: var(--ys-bar);
}

.ys-chart__bar.is-shun {
	fill: var(--ys-shun);
}

.ys-chart__line {
	fill: none;
	stroke: var(--c-ink);
	stroke-width: 2.5;
	stroke-linejoin: round;
}

.ys-chart__dot {
	fill: #fff;
	stroke: var(--c-ink);
	stroke-width: 2.5;
}

.ys-chart__avg {
	stroke: var(--c-ink-3);
	stroke-width: 1;
	stroke-dasharray: 4 4;
}

.ys-chart__month {
	fill: var(--c-ink-3);
	font-family: var(--font-en);
	font-size: 13px;
	text-anchor: middle;
}

.pt .ys-d__legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 18px;
	margin-top: 4px;
	color: var(--c-ink-3);
	font-size: 1.2rem;
}

.ys-d__key {
	display: inline-block;
	flex: none;
	width: 12px;
	height: 12px;
	border-radius: 3px;
}

.ys-d__key--bar {
	background: var(--ys-bar);
}

.ys-d__key--shun {
	background: var(--ys-shun);
}

.ys-d__key--line {
	height: 3px;
	border-radius: 2px;
	background: var(--c-ink);
}

.ys-d__key--avg {
	height: 0;
	border-top: 1.5px dashed var(--c-ink-3);
	border-radius: 0;
}

/* 産地リレーの色（上位4産地とその他） */
.ys-relay__seg--0 {
	fill: #35b0ff;
	background: #35b0ff;
}

.ys-relay__seg--1 {
	fill: #9be427;
	background: #9be427;
}

.ys-relay__seg--2 {
	fill: #ff9aa5;
	background: #ff9aa5;
}

.ys-relay__seg--3 {
	fill: #f4c95d;
	background: #f4c95d;
}

.ys-relay__seg--4 {
	fill: #dfe5ea;
	background: #dfe5ea;
}

.pt .ys-d__origins {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin-top: 8px;
	font-size: 1.3rem;
}

.ys-d__origins li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.pt .ys-d__links {
	margin-top: 24px;
}

.ys .ys-d__links .text-link {
	color: var(--c-ink);
	text-decoration: none;
}

.ys-d__legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.pt .ys-source {
	max-width: 1000px;
	margin: clamp(40px, 6vw, 64px) auto 0;
	color: var(--c-ink-3);
	font-size: 1.2rem;
	line-height: 1.8;
}

.ys :is(button, a):focus-visible {
	outline: 2px solid var(--c-blue);
	outline-offset: 2px;
}

@media (max-width: 799px) {
	.ys-months {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		border-radius: 20px;
	}

	.ys-price__row {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 6px 12px;
	}

	.ys-price__bar {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.ys-price__yen {
		display: none;
	}
}

/* スマホでは2列にし、アイコンを上・名前と棒グラフを下に置く。 */
@media (max-width: 599px) {
	.pt .ys-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.pt .ys-card {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: 12px;
	}

	.ys-card .ys-icon {
		width: 40px;
		border-radius: 10px;
	}

	.ys-card__body {
		align-self: stretch;
	}

	.ys-spark {
		width: 100%;
		height: auto;
	}
}
