/**
 * カーテンのサイズ計算（[picolabo_curtain]）。共通部品は base.css（商品ボックスは pt-pick）。
 *
 * 左（スマホでは上）に窓の種類・開き方・レールの幅・丈、右に買う既製サイズと幅・丈の説明、オーダーのサイズ、図、このサイズの商品。
 * 図は SVG（viewBox 320×250）に JS が描く。カーテンは薄い青、レールは濃い線、床・窓台は実線、腰窓の窓枠の下は点線。
 */

@media (min-width: 1000px) {
	.ct-input {
		position: sticky;
		top: calc(var(--header-h) + 16px);
	}
}

/* 入力
   -------------------------------------------------------------------------- */
.ct-input {
	display: grid;
	gap: 24px;
}

.ct-field {
	display: grid;
	gap: 8px;
}

.ct-seg {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pt .ct-seg .pt-btn {
	flex: 1;
	min-height: 44px;
	font-size: 1.4rem;
}

.pt .ct-num {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ct .ct-num .pt-input {
	width: 140px;
	min-height: 48px;
	font-family: var(--font-en);
	font-size: 2rem;
	font-weight: 600;
	text-align: right;
}

.ct-num span {
	font-weight: 700;
}

/* 結果
   -------------------------------------------------------------------------- */
.ct-result {
	display: grid;
	gap: 12px;
}

.pt .ct-result__lead {
	color: var(--c-ink-2);
	font-size: 1.4rem;
	font-weight: 700;
}

.pt .ct-big {
	font-family: var(--font-en);
	font-size: clamp(3.2rem, 5vw, 4.8rem);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
}

.pt .ct-tags {
	justify-self: start;
	padding: 4px 14px;
	border-radius: 999px;
	background: var(--c-ink);
	color: #fff;
	font-size: 1.3rem;
	font-weight: 700;
}

.ct-list {
	display: grid;
	gap: 0;
	margin: 4px 0 0;
}

.ct-list > div {
	display: grid;
	grid-template-columns: 7em minmax(0, 1fr);
	gap: 12px;
	padding-block: 10px;
	border-bottom: 1px dashed var(--c-line-2);
}

.ct-list dt {
	font-size: 1.35rem;
	font-weight: 700;
}

.ct-list dd {
	margin: 0;
	font-size: 1.4rem;
	line-height: 1.7;
}

.ct-warn {
	display: grid;
	gap: 6px;
	padding: 12px 16px;
	border-radius: var(--radius-s);
	background: var(--c-tint-coral);
	color: var(--c-coral-ink);
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.7;
}

.ct-warn[hidden] {
	display: none;
}

/* 図 */
.ct-fig {
	margin: 8px 0 0;
	padding: 12px;
	border-radius: var(--radius-s);
	background: var(--c-tint);
}

.ct-fig svg {
	display: block;
	width: 100%;
	max-width: 480px;
	height: auto;
	margin-inline: auto;
}

.ct-fig figcaption {
	margin-top: 6px;
	text-align: center;
}

.ct-fig__glass {
	fill: #dff1fb;
	stroke: var(--c-line-2);
	stroke-width: 1;
}

.ct-fig__floor {
	stroke: var(--c-ink-2);
	stroke-width: 2;
}

.ct-fig__sill {
	stroke: var(--c-ink-2);
	stroke-width: 1.5;
	stroke-dasharray: 4 3;
}

.ct-fig__curtain {
	fill: rgba(0, 118, 182, 0.18);
	stroke: var(--c-blue-ink);
	stroke-width: 1.5;
}

.ct-fig__pleat {
	stroke: rgba(0, 118, 182, 0.35);
	stroke-width: 1;
}

.ct-fig__rail {
	stroke: var(--c-ink);
	stroke-width: 4;
	stroke-linecap: round;
}

.ct-fig__dim {
	stroke: var(--c-ink-2);
	stroke-width: 1;
}

.ct-fig__label {
	fill: var(--c-ink);
	font-family: var(--font-ja);
	font-size: 12px;
	font-weight: 700;
}

.ct-fig__small {
	fill: var(--c-ink-2);
	font-family: var(--font-ja);
	font-size: 11px;
}

/* このサイズのカーテン */
.ct-shop {
	display: grid;
	gap: 12px;
	margin-top: 10px;
	padding-top: 20px;
	border-top: 1px solid var(--c-line);
}

.ct-shop__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.pt .ct-shop__title {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.5;
}

.pt .ct-shop__lead {
	color: var(--c-ink-2);
	font-size: 1.35rem;
	line-height: 1.7;
}

.pt .ct-search .pt-btn {
	white-space: normal;
	min-height: 42px;
	padding-block: 8px;
	line-height: 1.4;
	text-align: center;
}

/* 一覧
   -------------------------------------------------------------------------- */
.ct-more {
	display: grid;
	gap: clamp(40px, 5vw, 56px);
	margin-top: clamp(40px, 5vw, 56px);
}

/* 中の表や図の幅で列が広がり、スマホでページごと横にはみ出さないようにする。 */
.ct-more > * {
	min-width: 0;
}

.pt .ct-more__title {
	margin: 0 0 16px;
	font-size: clamp(1.8rem, 2.2vw, 2.2rem);
	font-weight: 700;
	line-height: 1.5;
}

.pt .ct-more__note {
	margin-top: 10px;
}

.ct-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	background: #fff;
}

.ct-table {
	width: 100%;
	min-width: 480px;
	border-collapse: collapse;
	font-size: 1.4rem;
	line-height: 1.6;
}

.ct-table :is(th, td) {
	padding: 10px 16px;
	border-bottom: 1px solid var(--c-line);
	text-align: left;
	vertical-align: top;
}

.ct-table thead th {
	background: var(--c-tint);
	color: var(--c-ink-2);
	font-size: 1.25rem;
	font-weight: 700;
	white-space: nowrap;
}

.ct-table tbody th {
	font-weight: 700;
	white-space: nowrap;
}

.ct-table tbody tr:last-child :is(th, td) {
	border-bottom: 0;
}
