/*
 * 本サイトに書き足したページ(tools/static-site-pages/ の本文。tools/build-static-site.js の EXTRA_PAGES)の見た目
 *   /download/ … 法人向け資料(2026-10-29。docs/10 T-65)
 *   /events/   … 無料オンラインイベント(2026-10-29。docs/10 T-66)
 * 色・角丸・影は各ページの <style id="icebreak-original-site-design-inline"> の :root 変数(--ib-*)と、
 * そこにある部品(.ib-card・.ib-field・.ib-btn など)を使う
 */

/* 申し込む・ダウンロードなど、押してほしいボタン(CTA)はオレンジにする(2026-10-29 のオーナーの指示)。
   ほかのボタン(紺・白)と色で分け、どれを押せばよいか迷わないようにする。白い文字が読める濃さ(コントラスト 4.5 以上)にしてある。
   同じ色を site-notices.css のお知らせのボタンにも使う */
.ib-btn.ib-btn-cta {
	background: #c94f00;
	color: #fff;
	border-color: transparent;
	box-shadow: 0 12px 24px rgba(201, 79, 0, 0.26);
}

.ib-btn.ib-btn-cta:hover,
.ib-btn.ib-btn-cta:focus-visible {
	background: #b34600;
	box-shadow: 0 14px 28px rgba(201, 79, 0, 0.32);
}

.ib-btn.ib-btn-cta:disabled {
	background: #9a9fae;
	box-shadow: none;
}

/* 入力欄は幅 100% に内側の余白が足されて、カードの右へはみ出していた(スマホで 7px)。余白を幅に含める */
.ib-download-page .ib-field :is(input, select, textarea),
.ib-events-page .ib-field :is(input, select, textarea) {
	box-sizing: border-box;
}

/* フォームや結果の箱は display を持つので、hidden を確実に効かせる */
.ib-download-page [hidden],
.ib-events-page [hidden] {
	display: none !important;
}

/* ---------- 法人向け資料 ---------- */
.ib-download-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
	gap: clamp(32px, 5vw, 64px);
	align-items: start;
}

/* 資料の 3 ページを、扇のように少しずらして重ねる */
.ib-download-pages {
	position: relative;
	aspect-ratio: 10 / 7;
	margin: 0 0 26px;
}

.ib-download-pages img {
	position: absolute;
	top: 0;
	width: 44%;
	height: auto;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 18px 36px rgba(31, 42, 77, 0.18);
	transition: transform 0.3s ease;
}

.ib-download-pages img:nth-child(1) {
	top: 7%;
	left: 2%;
	z-index: 1;
	transform: rotate(-6deg);
}

.ib-download-pages img:nth-child(2) {
	left: 28%;
	z-index: 3;
}

.ib-download-pages img:nth-child(3) {
	top: 7%;
	left: 54%;
	z-index: 2;
	transform: rotate(6deg);
}

.ib-download-pages:hover img:nth-child(1) {
	transform: rotate(-8deg) translateX(-4%);
}

.ib-download-pages:hover img:nth-child(3) {
	transform: rotate(8deg) translateX(4%);
}

.ib-download-about .ib-feature-list {
	margin-top: 0;
}

.ib-download-meta {
	margin: 14px 0 0;
	color: var(--ib-muted, #5e6478);
	font-size: 13px;
}

.ib-download-card {
	padding: clamp(22px, 3vw, 32px);
}

.ib-download-ready {
	display: grid;
	gap: 16px;
}

/* .ib-card p(文字 14px・灰色)より強くする */
.ib-download-card .ib-download-ready__title {
	margin: 0;
	color: var(--ib-navy, #1f2a4d);
	font-family: "Shippori Mincho", serif;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.5;
}

/* ---------- 無料オンラインイベント ---------- */
.ib-events {
	display: grid;
	gap: 14px;
	margin-top: 28px;
}

.ib-events__state {
	margin: 0;
	padding: 22px;
	border: 1px dashed var(--ib-sand, #e6ddd3);
	border-radius: var(--ib-radius-sm, 14px);
	color: var(--ib-muted, #5e6478);
	font-size: 14px;
	line-height: 1.9;
}

/* 日付の札・中身・ボタン(「くわしく見る」と「このイベントに参加する」)の 3 列。日付は紺の札にして、日程を目で追いやすくする */
.ib-event {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr) auto;
	gap: 22px;
	align-items: center;
	padding: 18px 22px 18px 18px;
	background: #fff;
	border: 1px solid var(--ib-sand, #e6ddd3);
	border-radius: var(--ib-radius-sm, 14px);
	box-shadow: 0 8px 22px rgba(31, 42, 77, 0.06);
}

.ib-event__date {
	display: grid;
	justify-items: center;
	gap: 2px;
	padding: 14px 6px;
	border-radius: 12px;
	background: var(--ib-navy, #1f2a4d);
	color: #fff;
	text-align: center;
}

.ib-event__md {
	font-family: "Shippori Mincho", serif;
	font-size: 26px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: 0.02em;
}

.ib-event__wd {
	color: #f0b27a;
	font-size: 12px;
	font-weight: 800;
}

.ib-event__time {
	margin: 0 0 4px;
	color: var(--ib-warm, #c9544e);
	font-size: 13px;
	font-weight: 800;
}

.ib-event__title {
	margin: 0;
	color: var(--ib-navy, #1f2a4d);
	font-size: 18px;
	line-height: 1.55;
}

.ib-event__summary {
	margin: 6px 0 0;
	color: var(--ib-muted, #5e6478);
	font-size: 14px;
	line-height: 1.85;
	white-space: pre-line;
}

.ib-event__meta {
	margin: 8px 0 0;
	color: var(--ib-muted, #5e6478);
	font-size: 12.5px;
	font-weight: 700;
}

.ib-event__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
}

.ib-event.is-full {
	opacity: 0.6;
}

.ib-events-apply {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
	gap: clamp(32px, 5vw, 64px);
	align-items: start;
}

.ib-events-card {
	padding: clamp(22px, 3vw, 32px);
}

.ib-events-card select {
	width: 100%;
	border: 1px solid var(--ib-sand, #e6ddd3);
	border-radius: 12px;
	background: #fff;
	padding: 13px 14px;
	color: var(--ib-ink, #232838);
	font: inherit;
	line-height: 1.6;
}

.ib-events-done {
	display: grid;
	gap: 10px;
}

.ib-events-card .ib-events-done__title {
	margin: 0;
	color: var(--ib-navy, #1f2a4d);
	font-family: "Shippori Mincho", serif;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.5;
}

/* カレンダー(2026-10-29 のオーナーの指示)。マスに時刻・題・残りの席を出し、イベントのある日を押すとポップアップが開く */
.ib-cal {
	margin-top: 26px;
	background: #fff;
	border: 1px solid var(--ib-sand, #e6ddd3);
	border-radius: var(--ib-radius, 20px);
	box-shadow: 0 12px 30px rgba(31, 42, 77, 0.07);
	overflow: hidden;
}

.ib-cal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--ib-sand, #e6ddd3);
}

.ib-cal__month {
	margin: 0;
	color: var(--ib-navy, #1f2a4d);
	font-family: "Shippori Mincho", serif;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.ib-cal__nav {
	width: 44px;
	height: 44px;
	border: 1px solid var(--ib-sand, #e6ddd3);
	border-radius: 50%;
	background: #fff;
	color: var(--ib-navy, #1f2a4d);
	font: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.ib-cal__nav:disabled {
	opacity: 0.3;
	cursor: default;
}

.ib-cal__row {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ib-cal__row--head {
	background: var(--ib-cream, #f6f1ea);
}

.ib-cal__wd {
	padding: 8px 0;
	color: var(--ib-muted, #5e6478);
	font-size: 12px;
	font-weight: 800;
	text-align: center;
}

.ib-cal__wd.is-sun,
.ib-cal__cell.is-sun .ib-cal__day {
	color: var(--ib-warm, #c9544e);
}

.ib-cal__wd.is-sat,
.ib-cal__cell.is-sat .ib-cal__day {
	color: #3a63a8;
}

.ib-cal__cell {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	min-width: 0;
	min-height: 112px;
	padding: 8px;
	border: 0;
	border-top: 1px solid var(--ib-sand, #e6ddd3);
	border-left: 1px solid var(--ib-sand, #e6ddd3);
	background: #fff;
	color: var(--ib-ink, #232838);
	font: inherit;
	text-align: left;
}

.ib-cal__row .ib-cal__cell:first-child {
	border-left: 0;
}

.ib-cal__cell.is-blank {
	background: #fbf9f6;
}

.ib-cal__cell.is-past .ib-cal__day {
	opacity: 0.4;
}

button.ib-cal__cell {
	cursor: pointer;
	transition: background 0.2s ease;
}

button.ib-cal__cell:hover,
button.ib-cal__cell:focus-visible {
	background: var(--ib-cream, #f6f1ea);
}

button.ib-cal__cell:focus-visible {
	outline: 3px solid var(--ib-navy, #1f2a4d);
	outline-offset: -3px;
}

.ib-cal__day {
	font-size: 13px;
	font-weight: 800;
	line-height: 1.6;
}

.ib-cal__cell.is-today .ib-cal__day {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--ib-navy, #1f2a4d);
	color: #fff;
}

.ib-cal__chip {
	display: grid;
	gap: 1px;
	padding: 5px 7px;
	border-radius: 8px;
	background: var(--ib-navy, #1f2a4d);
	color: #fff;
	font-size: 11px;
	line-height: 1.45;
}

.ib-cal__chip.is-full {
	background: #c9ccd6;
	color: var(--ib-ink, #232838);
}

.ib-cal__chip-time {
	font-weight: 800;
	letter-spacing: 0.04em;
}

.ib-cal__chip-title {
	overflow: hidden;
	font-weight: 700;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ib-cal__chip-seats {
	color: #f0c98f;
	font-weight: 700;
}

.ib-cal__chip.is-full .ib-cal__chip-seats {
	color: var(--ib-muted, #5e6478);
}

.ib-cal__more {
	color: var(--ib-muted, #5e6478);
	font-size: 11px;
	font-weight: 700;
}

/* スマホでは、マスに件数の丸だけを出す(押すとポップアップで中身が開く) */
.ib-cal__dot {
	display: none;
}

.ib-cal__hint {
	margin: 12px 0 0;
	color: var(--ib-muted, #5e6478);
	font-size: 13px;
}

/* イベントのポップアップ */
.ib-ev-dialog {
	width: min(540px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	padding: clamp(24px, 4vw, 34px);
	border: 0;
	border-radius: var(--ib-radius, 20px);
	background: #fff;
	color: var(--ib-ink, #232838);
	box-shadow: 0 40px 100px rgba(22, 31, 58, 0.35);
}

.ib-ev-dialog::backdrop {
	background: rgba(22, 31, 58, 0.6);
	backdrop-filter: blur(4px);
}

.ib-ev-dialog__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: var(--ib-cream, #f6f1ea);
	color: var(--ib-ink, #232838);
	font: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.ib-ev-dialog__date {
	margin: 0 0 6px;
	padding-right: 44px;
	color: var(--ib-warm, #c9544e);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.06em;
}

.ib-ev-dialog__item + .ib-ev-dialog__item {
	margin-top: 22px;
	padding-top: 22px;
	border-top: 1px solid var(--ib-sand, #e6ddd3);
}

.ib-ev-dialog__time {
	margin: 0;
	color: var(--ib-muted, #5e6478);
	font-size: 14px;
	font-weight: 700;
}

.ib-ev-dialog__title {
	margin: 4px 0 0;
	color: var(--ib-navy, #1f2a4d);
	font-family: "Shippori Mincho", serif;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.45;
}

.ib-ev-dialog__summary {
	margin: 12px 0 0;
	color: var(--ib-muted, #5e6478);
	font-size: 14px;
	line-height: 1.9;
	white-space: pre-line;
}

.ib-ev-dialog__meta {
	margin: 12px 0 0;
	font-size: 13px;
	font-weight: 700;
}

.ib-ev-dialog__cta {
	width: 100%;
	margin-top: 18px;
}

.ib-ev-dialog__cta:disabled {
	opacity: 0.45;
	cursor: default;
	transform: none;
}

/* ポップアップから日程を選んだとき、フォームの「日程」を一瞬光らせる */
.ib-events-card .ib-field.is-picked select {
	animation: ib-picked 1.6s ease-out;
}

@keyframes ib-picked {
	0% { box-shadow: 0 0 0 0 rgba(201, 84, 78, 0.55); border-color: var(--ib-warm, #c9544e); }
	100% { box-shadow: 0 0 0 10px rgba(201, 84, 78, 0); }
}

@media (max-width: 900px) {
	.ib-download-grid,
	.ib-events-apply {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.ib-cal__cell {
		align-items: center;
		min-height: 54px;
		padding: 6px 2px;
	}

	.ib-cal__chip,
	.ib-cal__more {
		display: none;
	}

	.ib-cal__dot {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 20px;
		height: 20px;
		padding: 0 5px;
		border-radius: 999px;
		background: var(--ib-navy, #1f2a4d);
		color: #fff;
		font-size: 11px;
		font-weight: 800;
	}

	.ib-cal__month {
		font-size: 19px;
	}
}

@media (max-width: 640px) {
	.ib-event {
		grid-template-columns: 72px minmax(0, 1fr);
		gap: 14px;
		padding: 14px;
	}

	.ib-event__md {
		font-size: 20px;
	}

	/* スマホではボタンを横いっぱいに縦に並べ、「このイベントに参加する」を上にする */
	.ib-event__actions {
		grid-column: 1 / -1;
		flex-direction: column-reverse;
	}

	.ib-event__cta {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ib-download-pages img {
		transition: none;
	}
}
