.egifun-tide-wrap {
	container-name: egifun-tide-card;
	container-type: inline-size;
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	margin: 28px 0;
	overflow: hidden !important;
	box-sizing: border-box;
}

.egifun-tide {
	--et-navy: #082a57;
	--et-blue: #0d68cb;
	--et-light-blue: #eaf5ff;
	--et-coral: #ff514c;
	--et-border: #d6e1ec;
	--et-muted: #59708b;
	display: grid;
	grid-template-columns: minmax(104px, 18%) minmax(0, 82%);
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	margin: 0;
	border: 1px solid var(--et-border);
	border-radius: 0;
	background: #fff;
	color: var(--et-navy);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
	line-height: 1.45;
	overflow: hidden;
	box-sizing: border-box;
}

.egifun-tide *,
.egifun-tide *::before,
.egifun-tide *::after {
	box-sizing: border-box;
}

.egifun-tide__days {
	display: grid;
	grid-template-rows: repeat(7, minmax(72px, 1fr));
	border-right: 1px solid var(--et-border);
	background: #fbfdff;
}

.egifun-tide__day {
	appearance: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-height: 76px;
	margin: 0;
	padding: 12px 8px;
	border: 0;
	border-bottom: 1px solid var(--et-border);
	border-radius: 0;
	background: transparent;
	color: var(--et-navy);
	font: inherit;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.egifun-tide__day:last-child {
	border-bottom: 0;
}

.egifun-tide__day:hover,
.egifun-tide__day:focus-visible {
	background: #eef7ff;
	outline: 3px solid rgba(13, 104, 203, .18);
	outline-offset: -3px;
}

.egifun-tide__day.is-active {
	background: linear-gradient(145deg, #103d75 0%, #061f46 100%);
	color: #fff;
}

.egifun-tide__day-date {
	font-size: clamp(20px, 2vw, 28px);
	font-weight: 750;
	letter-spacing: .02em;
}

.egifun-tide__day-label {
	font-size: 14px;
	font-weight: 700;
}

.egifun-tide__main {
	width: 100%;
	max-width: 100%;
	min-width: 0 !important;
	padding: 28px 34px 24px;
	overflow: hidden;
}

.egifun-tide__header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 22px;
}

.egifun-tide__egi {
	display: inline-flex;
	flex: 0 0 72px;
	width: 72px;
	height: 40px;
}

.egifun-tide__egi svg {
	display: block;
	width: 100%;
	height: 100%;
}

.egifun-tide__title {
	min-width: 0;
	overflow-wrap: anywhere;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--et-navy) !important;
	font-size: clamp(26px, 3.2vw, 42px) !important;
	font-weight: 800 !important;
	line-height: 1.25 !important;
	letter-spacing: .02em;
}

.egifun-tide__summary {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	align-items: center;
	margin-bottom: 16px;
}

.egifun-tide__summary-date,
.egifun-tide__badge,
.egifun-tide__status,
.egifun-tide__next {
	min-width: 0;
	min-height: 64px;
	border: 1px solid #bed7ee;
	border-radius: 9px;
	background: linear-gradient(180deg, #f8fcff 0%, #edf7ff 100%);
}

.egifun-tide__summary-date {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	border-color: transparent;
	background: transparent;
	font-size: clamp(18px, 2vw, 27px);
}

.egifun-tide__summary-date > span {
	color: var(--et-blue);
	font-size: 25px;
}

.egifun-tide__summary-date strong {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.egifun-tide__badge {
	display: grid;
	place-items: center;
	padding: 10px;
	background: linear-gradient(145deg, #eff8ff, #dcecff);
	font-size: 22px;
	font-weight: 800;
}

.egifun-tide__status,
.egifun-tide__next {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 14px;
	font-size: 16px;
	text-align: center;
	overflow-wrap: anywhere;
}

.egifun-tide__status strong {
	color: var(--et-blue);
	font-size: 22px;
}

.egifun-tide__status {
	grid-column: 1 / -1;
}

.egifun-tide__next {
	flex-wrap: wrap;
}

.egifun-tide__next strong {
	color: var(--et-coral);
	font-size: 21px;
}

.egifun-tide__next--low strong {
	color: var(--et-blue);
}

.egifun-tide__graph-wrap {
	width: 100%;
	min-width: 0;
	overflow: hidden;
}

.egifun-tide__graph {
	display: block;
	width: 100%;
	height: auto;
	min-height: 250px;
}

.egifun-graph-grid {
	stroke: #d7e3ef;
	stroke-width: 1;
	stroke-dasharray: 5 5;
}

.egifun-graph-grid--vertical {
	stroke-opacity: .65;
}

.egifun-graph-axis,
.egifun-graph-unit {
	fill: #183b64;
	font-size: 15px;
	font-weight: 600;
}

.egifun-graph-unit {
	font-size: 16px;
}

.egifun-graph-line {
	fill: none;
	stroke: var(--et-blue);
	stroke-width: 3;
	stroke-linejoin: round;
	stroke-linecap: round;
}

.egifun-event-guide {
	stroke-width: 1.5;
	stroke-dasharray: 4 4;
}

.egifun-event-guide--high { stroke: #ff7d76; }
.egifun-event-guide--low { stroke: #65a5e8; }

.egifun-event-dot {
	stroke: #fff;
	stroke-width: 2;
}

.egifun-event-dot--high { fill: var(--et-coral); }
.egifun-event-dot--low { fill: var(--et-blue); }

.egifun-event-box {
	fill: rgba(255, 255, 255, .95);
	stroke-width: 1.4;
}

.egifun-event-box--high { stroke: var(--et-coral); }
.egifun-event-box--low { stroke: var(--et-blue); }

.egifun-event-text {
	font-size: 14px;
	font-weight: 750;
}

.egifun-event-text--high { fill: #f1433e; }
.egifun-event-text--low { fill: #075db5; }

.egifun-tide__events {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0 0 18px;
	border: 1px solid var(--et-border);
	border-radius: 8px;
	overflow: hidden;
}

.egifun-tide__event {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 10px;
	min-height: 60px;
	padding: 10px 14px;
	border-right: 1px solid var(--et-border);
	font-size: 16px;
	min-width: 0;
}

.egifun-tide__event:last-child {
	border-right: 0;
}

.egifun-tide__event:nth-child(2n) {
	border-right: 0;
}

.egifun-tide__event:nth-child(n+3) {
	border-top: 1px solid var(--et-border);
}

.egifun-tide__event-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 52px;
	padding: 6px 8px;
	border-radius: 4px;
	color: #fff;
	font-weight: 800;
}

.egifun-tide__event--high .egifun-tide__event-label {
	background: var(--et-coral);
}

.egifun-tide__event--low .egifun-tide__event-label {
	background: var(--et-blue);
}

.egifun-tide__event strong {
	font-size: 19px;
}

.egifun-tide__astronomy {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 14px;
}

.egifun-tide__astro {
	display: grid;
	grid-template-columns: 120px 1fr;
	align-items: center;
	min-height: 126px;
	padding: 16px 22px;
	border: 1px solid var(--et-border);
	border-radius: 10px;
	min-width: 0;
}

.egifun-tide__astro--sun {
	background: linear-gradient(135deg, #fffaf2, #fff);
}

.egifun-tide__astro--moon {
	background: linear-gradient(135deg, #f1f7ff, #fff);
}

.egifun-tide__astro-icon {
	display: grid;
	place-items: center;
	width: 90px;
	height: 90px;
	border-right: 1px solid var(--et-border);
	font-size: 70px;
	line-height: 1;
}

.egifun-tide__astro--sun .egifun-tide__astro-icon { color: #f5a623; }
.egifun-tide__astro--moon .egifun-tide__astro-icon { color: #79a7d4; }

.egifun-tide__astro > div {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px 16px;
	align-items: center;
	font-size: 17px;
}

.egifun-tide__astro strong {
	font-size: 21px;
	font-variant-numeric: tabular-nums;
}

.egifun-tide__note {
	margin: 0 !important;
	color: var(--et-muted);
	font-size: 12px;
	line-height: 1.65;
}

.egifun-tide__note a {
	color: var(--et-blue);
	text-decoration: underline;
}

.egifun-tide-error {
	padding: 14px 16px;
	border-left: 4px solid #d63638;
	background: #fff4f4;
	color: #5b2020;
}

/* 記事本文の実際の横幅を基準に、右側が欠けない配置へ切り替える。 */
@container egifun-tide-card (max-width: 980px) {
	.egifun-tide {
		grid-template-columns: 120px minmax(0, 1fr);
	}

	.egifun-tide__main {
		padding: 22px 20px 20px;
	}

	.egifun-tide__header {
		gap: 12px;
		margin-bottom: 18px;
	}

	.egifun-tide__egi {
		flex-basis: 58px;
		width: 58px;
		height: 34px;
	}

	.egifun-tide__title {
		font-size: clamp(24px, 4cqi, 32px) !important;
	}

	.egifun-tide__summary {
		grid-template-columns: minmax(0, 1.25fr) minmax(90px, .75fr);
		gap: 10px;
	}

	.egifun-tide__summary-date,
	.egifun-tide__badge,
	.egifun-tide__status,
	.egifun-tide__next {
		min-height: 54px;
	}

	.egifun-tide__summary-date {
		padding: 8px 10px;
		font-size: 19px;
	}

	.egifun-tide__badge {
		font-size: 19px;
	}

	.egifun-tide__status,
	.egifun-tide__next {
		grid-column: auto;
		padding: 8px 10px;
		font-size: 14px;
	}

	.egifun-tide__status strong,
	.egifun-tide__next strong {
		font-size: 18px;
	}

	.egifun-tide__events {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.egifun-tide__event:nth-child(2n) {
		border-right: 0;
	}

	.egifun-tide__event:nth-child(n+3) {
		border-top: 1px solid var(--et-border);
	}

	.egifun-tide__astronomy {
		gap: 10px;
	}

	.egifun-tide__astro {
		grid-template-columns: 68px minmax(0, 1fr);
		padding: 12px;
	}

	.egifun-tide__astro-icon {
		width: 56px;
		height: 68px;
		font-size: 48px;
	}

	.egifun-tide__astro > div {
		gap: 8px 10px;
		font-size: 15px;
	}

	.egifun-tide__astro strong {
		font-size: 18px;
	}
}

@container egifun-tide-card (max-width: 700px) {
	.egifun-tide {
		display: flex;
		flex-direction: column;
		border-radius: 10px;
	}

	.egifun-tide__days {
		display: flex;
		grid-template-rows: none;
		order: 0;
		width: 100%;
		border-right: 0;
		border-bottom: 1px solid var(--et-border);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}

	.egifun-tide__day {
		flex: 0 0 88px;
		min-height: 70px;
		border-right: 1px solid var(--et-border);
		border-bottom: 0;
		scroll-snap-align: start;
	}

	.egifun-tide__day-date {
		font-size: 19px;
	}

	.egifun-tide__main {
		padding: 20px 14px 16px;
	}

	.egifun-tide__header {
		gap: 9px;
		margin-bottom: 16px;
	}

	.egifun-tide__egi {
		flex-basis: 50px;
		width: 50px;
		height: 30px;
	}

	.egifun-tide__title {
		font-size: clamp(22px, 7cqi, 30px) !important;
	}

	.egifun-tide__summary {
		grid-template-columns: minmax(0, 1fr) 90px;
		gap: 9px;
	}

	.egifun-tide__summary-date {
		padding: 8px;
		font-size: 17px;
	}

	.egifun-tide__summary-date > span {
		display: none;
	}

	.egifun-tide__badge {
		font-size: 18px;
	}

	.egifun-tide__status,
	.egifun-tide__next {
		padding: 8px;
		font-size: 14px;
	}

	.egifun-tide__status strong,
	.egifun-tide__next strong {
		font-size: 17px;
	}

	.egifun-tide__graph-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.egifun-tide__graph {
		width: 780px;
		max-width: none;
		min-height: 280px;
	}

	.egifun-tide__event {
		grid-template-columns: 1fr;
		gap: 5px;
		text-align: center;
	}

	.egifun-tide__event-label {
		justify-self: center;
	}

	.egifun-tide__astronomy {
		grid-template-columns: 1fr;
	}

	.egifun-tide__astro {
		grid-template-columns: 66px minmax(0, 1fr);
		min-height: 96px;
	}
}

@media (max-width: 1100px) {
	.egifun-tide {
		grid-template-columns: 120px minmax(0, 1fr);
	}

	.egifun-tide__main {
		padding: 24px 22px 20px;
	}

	.egifun-tide__summary {
		grid-template-columns: minmax(0, 1.25fr) minmax(90px, .75fr);
	}

	.egifun-tide__next {
		grid-column: auto;
		min-height: 50px;
	}

	.egifun-tide__events {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.egifun-tide__event:nth-child(2n) { border-right: 0; }
	.egifun-tide__event:nth-child(n+3) { border-top: 1px solid var(--et-border); }

	.egifun-tide__astro {
		grid-template-columns: 76px 1fr;
		padding: 14px;
	}

	.egifun-tide__astro-icon {
		width: 62px;
		height: 72px;
		font-size: 50px;
	}
}

@media (max-width: 760px) {
	.egifun-tide {
		display: flex;
		flex-direction: column;
		border-radius: 10px;
	}

	.egifun-tide__days {
		display: flex;
		grid-template-rows: none;
		order: 0;
		width: 100%;
		border-right: 0;
		border-bottom: 1px solid var(--et-border);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}

	.egifun-tide__day {
		flex: 0 0 88px;
		min-height: 70px;
		border-right: 1px solid var(--et-border);
		border-bottom: 0;
		scroll-snap-align: start;
	}

	.egifun-tide__day-date {
		font-size: 19px;
	}

	.egifun-tide__main {
		padding: 20px 14px 16px;
	}

	.egifun-tide__header {
		gap: 9px;
		margin-bottom: 16px;
	}

	.egifun-tide__egi {
		flex-basis: 50px;
		width: 50px;
		height: 30px;
	}

	.egifun-tide__title {
		font-size: clamp(22px, 7vw, 30px) !important;
	}

	.egifun-tide__summary {
		grid-template-columns: 1fr 90px;
		gap: 9px;
	}

	.egifun-tide__summary-date,
	.egifun-tide__badge,
	.egifun-tide__status,
	.egifun-tide__next {
		min-height: 52px;
	}

	.egifun-tide__summary-date {
		padding: 8px;
		font-size: 17px;
	}

	.egifun-tide__summary-date > span { display: none; }

	.egifun-tide__badge {
		font-size: 18px;
	}

	.egifun-tide__status,
	.egifun-tide__next {
		grid-column: auto;
		padding: 8px;
		font-size: 14px;
	}

	.egifun-tide__status strong,
	.egifun-tide__next strong {
		font-size: 17px;
	}

	.egifun-tide__graph-wrap {
		overflow-x: auto;
	}

	.egifun-tide__graph {
		width: 780px;
		max-width: none;
		min-height: 280px;
	}

	.egifun-tide__events {
		grid-template-columns: 1fr 1fr;
	}

	.egifun-tide__event {
		grid-template-columns: 1fr;
		gap: 5px;
		text-align: center;
	}

	.egifun-tide__event-label {
		justify-self: center;
	}

	.egifun-tide__astronomy {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.egifun-tide__astro {
		grid-template-columns: 66px 1fr;
		min-height: 96px;
	}

	.egifun-tide__astro-icon {
		width: 54px;
		height: 64px;
		font-size: 44px;
	}

	.egifun-tide__astro > div {
		font-size: 15px;
	}

	.egifun-tide__astro strong {
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.egifun-tide__day {
		transition: none;
	}
}

/*
 * テーマやブロックエディター側の幅指定より優先し、潮見表全体を
 * 必ず記事本文の内側へ収めるための最終制約。
 */
.egifun-tide-wrap,
.egifun-tide,
.egifun-tide__main,
.egifun-tide__header,
.egifun-tide__summary,
.egifun-tide__graph-wrap,
.egifun-tide__events,
.egifun-tide__astronomy,
.egifun-tide__astro {
	max-inline-size: 100% !important;
	min-inline-size: 0 !important;
}

.egifun-tide__summary {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.egifun-tide__status {
	grid-column: 1 / -1 !important;
}

.egifun-tide__events {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.egifun-tide__graph {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: auto;
}

.egifun-tide__summary > *,
.egifun-tide__event,
.egifun-tide__astro > div {
	min-width: 0 !important;
	overflow-wrap: anywhere;
}
