/**
 * 身長差メーカー（[picolabo_shinchosa]）。共通部品は base.css。
 */

/* 入力欄
   -------------------------------------------------------------------------- */
.sinch-setup {
	display: grid;
	gap: 16px;
}

.sinch-people {
	display: grid;
	gap: 12px;
}

.sinch-person {
	padding: 12px 14px 14px;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-s);
	background: #fff;
}

.sinch-person__head {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sinch-person__dot {
	flex: none;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--c);
}

.sinch .sinch-person__name {
	flex: 1;
	min-width: 0;
	min-height: 38px;
	font-weight: 700;
}

.sinch-person__remove {
	flex: none;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid var(--c-line-2);
	border-radius: 50%;
	background: #fff;
	color: var(--c-ink-2);
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

.sinch-person__remove:hover {
	border-color: var(--c-coral-ink);
	color: var(--c-coral-ink);
}

.sinch-person__fields {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px 8px;
	margin-top: 10px;
}

.sinch-field {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.sinch-field--wide {
	grid-column: 1 / -1;
}

.sinch-field select.pt-input {
	padding-left: 8px;
	padding-right: 22px;
	background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%;
	font-size: 1.5rem;
}

.sinch-field__label {
	color: var(--c-ink-2);
	font-size: 1.2rem;
	font-weight: 500;
}

.sinch-height {
	display: flex;
	align-items: center;
	overflow: hidden;
	border: 1px solid var(--c-line-2);
	border-radius: 999px;
	background: #fff;
}

.sinch-height__btn {
	flex: none;
	width: 46px;
	height: 44px;
	padding: 0;
	border: 0;
	background: var(--c-tint);
	color: var(--c-ink);
	font: 500 2rem/1 var(--font-en);
	cursor: pointer;
	touch-action: manipulation;
}

.sinch-height__btn:hover {
	background: var(--c-tint-blue);
}

/* 欄全体（丸い枠）にフォーカスの線を出し、数字の欄だけの四角い線は出さない。 */
.sinch-height:focus-within {
	outline: 2px solid var(--c-blue);
	outline-offset: 1px;
}

.sinch .sinch-height__input:focus,
.sinch .sinch-height__btn:focus-visible {
	outline: none;
}

.sinch-height__input {
	flex: 1;
	min-width: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--c-ink);
	font: 600 2rem/1 var(--font-en);
	text-align: right;
	-moz-appearance: textfield;
	appearance: textfield;
}

.sinch-height__input::-webkit-inner-spin-button,
.sinch-height__input::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.sinch-height__unit {
	flex: none;
	padding: 0 12px 0 4px;
	color: var(--c-ink-2);
	font-size: 1.3rem;
}

/* 身長のスライダー。つまみまでを、その人の色で塗る（--p はつまみの位置 0〜1）。 */
.sinch-range {
	--p: 0.5;
	display: block;
	width: 100%;
	height: 32px;
	margin: 4px 0 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.sinch-range::-webkit-slider-runnable-track {
	height: 6px;
	border-radius: 999px;
	background: linear-gradient(to right, var(--c) calc(11px + (100% - 22px) * var(--p)), var(--c-line-2) 0);
}

.sinch-range::-moz-range-track {
	height: 6px;
	border-radius: 999px;
	background: linear-gradient(to right, var(--c) calc(11px + (100% - 22px) * var(--p)), var(--c-line-2) 0);
}

.sinch-range::-webkit-slider-thumb {
	box-sizing: border-box;
	width: 22px;
	height: 22px;
	margin-top: -8px;
	border: 3px solid var(--c);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(30, 35, 40, 0.25);
	-webkit-appearance: none;
	appearance: none;
}

.sinch-range::-moz-range-thumb {
	box-sizing: border-box;
	width: 22px;
	height: 22px;
	border: 3px solid var(--c);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(30, 35, 40, 0.25);
}

.sinch .sinch-range:focus {
	outline: none;
}

.sinch-range:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.3);
}

.sinch-range:focus-visible::-moz-range-thumb {
	box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.3);
}

.sinch .sinch-add {
	justify-self: start;
}

/* 図と結果
   -------------------------------------------------------------------------- */
.sinch-stage__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
}

.sinch-options {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
}

.sinch-summary {
	margin-top: 14px;
}

.sinch .sinch-summary__main {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.3;
}

.sinch-summary__main strong {
	margin-right: 2px;
	font-family: var(--font-en);
	font-size: clamp(3.2rem, 5vw, 4rem);
	font-weight: 600;
	letter-spacing: 0.01em;
}

.sinch .sinch-summary__sub {
	margin-top: 4px;
	color: var(--c-ink-3);
	font-size: 1.3rem;
	line-height: 1.6;
}

.sinch .sinch-summary__eye {
	margin-top: 10px;
	padding: 8px 12px;
	border-radius: var(--radius-s);
	background: var(--c-tint-blue);
	color: var(--c-ink);
	font-size: 1.4rem;
	line-height: 1.6;
}

.sinch-figure {
	margin-top: 12px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
}

.sinch-svg {
	display: block;
	max-width: none;
	font-family: var(--font-ja);
}

.sinch .sinch-scroll-hint {
	margin-top: 4px;
	color: var(--c-ink-3);
	font-size: 1.2rem;
	text-align: center;
}

.sinch .sinch-list {
	display: grid;
	gap: 6px;
	margin-top: 12px;
	padding: 12px 16px;
	border-radius: var(--radius-s);
	background: var(--c-tint);
}

.sinch-list li {
	display: grid;
	grid-template-columns: 10px minmax(0, 1fr) auto 5.5em;
	align-items: center;
	gap: 10px;
	font-size: 1.4rem;
}

.sinch-list li::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--c);
}

.sinch-list__name {
	overflow: hidden;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sinch-list__height {
	font-family: var(--font-en);
	font-weight: 600;
}

.sinch-list__diff {
	color: var(--c-ink-2);
	font-size: 1.3rem;
	text-align: right;
}

.sinch-actions {
	margin-top: 16px;
}

/* スマホで図が画面の外にあるときだけ、画面の下に身長差を出す
   -------------------------------------------------------------------------- */
.sinch-peek {
	position: fixed;
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	left: 50%;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 6px 6px 6px 18px;
	border-radius: 999px;
	background: var(--c-ink);
	color: #fff;
	box-shadow: 0 6px 18px rgba(30, 35, 40, 0.22);
	transform: translateX(-50%);
	white-space: nowrap;
}

.sinch .sinch-peek__text {
	margin: 0;
	font-size: 1.3rem;
}

.sinch-peek__text b {
	margin: 0 2px 0 6px;
	font: 600 2rem/1 var(--font-en);
}

.sinch-peek__btn {
	min-height: 36px;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: var(--c-ink);
	font-size: 1.3rem;
	font-weight: 700;
	cursor: pointer;
}

@media (min-width: 1000px) {
	.sinch-peek {
		display: none;
	}
}
