.wrapper .block #inputBlock .table {
    width: 100%;
    display: table;
}

.wrapper .block #inputBlock .thead {
    display: table-header-group;
}

.wrapper .block #inputBlock .thead .tr {
    display: table-row;
}

.wrapper .block #inputBlock .thead .th {
    display: table-cell;
    color: #fff;
    background-color: #333;
    font-size: 125%;
    font-weight: 700;
    line-height: 1.3;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 11px;
    padding-bottom: 11px;
    border-left: 2px solid #fff;
    border-bottom: 3px solid #fff;
}

.wrapper .block #inputBlock .tbody .td:first-child {
    border-left: none;
    width:25%;
}

.wrapper .block #inputBlock .tbody {
    display: table-row-group;
}

.wrapper .block #inputBlock .tbody .tr {
    display: table-row;
}

.wrapper .block #inputBlock .tbody .td {
    display: table-cell;
    font-weight: 700;
    line-height: 1.3;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 16px;
    padding-bottom: 16px;
    border-bottom: 3px solid #fff;
    vertical-align: middle;
}

.wrapper .block #inputBlock .tbody .e {
    background-color: #eee;
    font-size: 125%;
    text-align: center;
}

.wrapper .block #inputBlock .tbody .v {
    background-color: #f9f9f9;
    font-size: 117%;
}




.wrapper .block #outputBlock .table {
    width: 100%;
    display: table;
}

.wrapper .block #outputBlock .tbody .td:first-child {
    border-left: none;
}

.wrapper .block #outputBlock .tbody {
}

.wrapper .block #outputBlock .tbody .tr {
}

.wrapper .block #outputBlock .tbody .td {
    display: block;
    width:100%;
    font-weight: 700;
    line-height: 1.3;
    padding-left: 4px;
    padding-right: 4px;
    vertical-align: middle;
    text-align: center;
    font-size: 117%;
    border-left: 2px solid #fff;
    border-bottom: 3px solid #fff;
    background-color: #eee;
	height:80px;
}
.wrapper .block #outputBlock .tbody .v {
    background-color: #f9f9f9;
}




	.wrapper .block #outputBlock .tbody .tr-responsive {
		display: grid!important;
	}
	.wrapper .block #outputBlock .tbody .td {
		width:100%;
		padding: 20px 0;
		        height: 100%;
	}



.form_txt{
	width:140px;
}

.label1 {
	font-weight: bold;
	font-size: 117%;
}

.label2 {
	font-size: 80%;
}

.value {
	font-weight: bold;
	color: #23ac38;
	font-size: 200%;
}

span.unit {
	font-size: 50%;
}

#inputBlock {
    background: #eff3f7;
	margin-bottom:40px;
}

#outputBlock {
    background: #fff;
}




.graphic{
	padding-top:30px;
	padding-bottom:0px;
}
.row {
	margin-bottom: 4px;
}
@keyframes expand {
	from {width: 0%;}
	to {width: 100%;}
}
@media screen and (min-width: 768px) {
	@keyframes expand {
		from {width: 0%;}
		to {width: calc(100%);}
	}
}
.chart {
	overflow: hidden;
	width: 0%;
	animation: expand 1.5s ease forwards;
	position: relative;
}
.row + .row .chart {
	animation-delay: .2s;
}
.row + .row + .row .chart {
	animation-delay: .4s;
}


.axisBlock1,
.axisBlock2{
	display: block;
	height: 12px;
	font-size: 14px;
	float: left;
	position: relative;
	overflow: hidden;
	opacity: 1;
	transition: opacity, .3s ease;
	cursor: pointer;
}
.axisBlock1 .blockValue,
.axisBlock2 .blockValue{
	display: none;
}
.axisBlock1 .blockLabel,
.axisBlock2 .blockLabel{
	display: block;
	line-height: 1em;
	position: absolute;
}
.axisBlock1 .blockLabel{
	font-size:12px;
	white-space: nowrap
}
.axisBlock1 .blockLabel:after{
	font-size:7px;
	content: "kg";
}
.axisBlock1 .blockLabelLast,
.axisBlock2 .blockLabelLast{
	display: block;
	line-height: 1em;
	position: absolute;
	right:0;
	font-size:12px;
	white-space: nowrap
}
.axisBlock1 .blockLabelLast:after{
	font-size:7px;
	content: "kg";
}


.chartBlock {
	display: block;
	height: 80px;
	color: #fff;
	font-size: .75em;
	float: left;
	background-color: #FF8C01;
	position: relative;
	overflow: hidden;
	opacity: 1;
	transition: opacity, .3s ease;
	cursor: pointer;
}
.chartBlock:nth-of-type(2),
.legend li:nth-of-type(2):before {
	background-color: #FFAA1C;
}
.chartBlock:nth-of-type(3),
.legend li:nth-of-type(3):before {
	background-color: #FFE733;
}
.chartBlock:nth-of-type(4),
.legend li:nth-of-type(4):before {
	background-color: #006B3E;
}
.chartBlock:nth-of-type(5),
.legend li:nth-of-type(5):before {
	background-color: #FFE733;
}
.chartBlock:nth-of-type(6),
.legend li:nth-of-type(6):before {
	background-color: #FFAA1C;
}
.chartBlock:nth-of-type(7),
.legend li:nth-of-type(7):before {
	background-color: #FF8C01;
}
.chartBlock:nth-of-type(8),
.legend li:nth-of-type(8):before {
	background-color: #ED2938;
}
.chartBlock .blockValue {
	display: none;
}
.chartBlock:hover {
	opacity: .65;
}


/* 低体重 */
.judge1 {
	position: absolute;
	top: 40%;
	left: 3.5%;
	color:#000;
	font-weight: bold;
}
/* 普通体重 */
.judge2 {
	position: absolute;
	top: 40%;
	left: 17.5%;
	color:#fff;
	font-weight: bold;
}
/* 肥満(1度) */
.judge3 {
	position: absolute;
	top: 40%;
	left: 33.5%;
	color:#000;
	font-weight: bold;
}
/* 肥満(2度) */
.judge4 {
	position: absolute;
	top: 40%;
	left: 47.5%;
	color:#000;
	font-weight: bold;
}
/* 肥満(3度) */
.judge5 {
	position: absolute;
	top: 40%;
	left: 61.5%;
	color:#000;
	font-weight: bold;
}
/* 肥満(4度) */
.judge6 {
	position: absolute;
	top: 40%;
	left: 81.5%;
	color:#000;
	font-weight: bold;
}
@media screen and (max-width: 480px) {
	.axisBlock1 .blockLabel{
		font-size:8px;
	}
	.axisBlock1 .blockLabel:after{
		font-size:5px;
		content: "kg";
	}
	.axisBlock1 .blockLabelLast{
		font-size:8px;
	}
	.axisBlock1 .blockLabelLast:after{
		font-size:5px;
		content: "kg";
	}

	.axisBlock2 .blockLabel{
		font-size:10px;
	}
	.axisBlock2 .blockLabelLast{
		font-size:10px;
	}


	/* 低体重 */
	.judge1 {
		left: 2.5%;
		font-size:80%;
	}
	/* 普通体重 */
	.judge2 {
		left: 16.5%;
		font-size:80%;
	}
	/* 肥満(1度) */
	.judge3 {
		left: 32.5%;
		font-size:80%;
	}
	/* 肥満(2度) */
	.judge4 {
		left: 46%;
		font-size:80%;
	}
	/* 肥満(3度) */
	.judge5 {
		left: 60%;
		font-size:80%;
	}
	/* 肥満(4度) */
	.judge6 {
		left: 80.5%;
		font-size:80%;
	}
}





.bmiBlock {
	display: block;
	height: 26px;
	float: left;
	position: relative;
	overflow: hidden;
	opacity: 1;
	transition: opacity, .3s ease;
	cursor: pointer;
}
.bmiBlock .blockValue {
	display: none;
}
.bmiArrow {
	position: absolute;
}




.x-axis {
    text-align: center;
	padding: 0;
}
.x-axis .title{
	font-size:150%;
	font-weight:bold;
}
/* プルダウンの基本スタイル */
.wrapper .block #inputBlock select {
    width: auto;
    font-size: 117%;
    font-weight: 700;
    line-height: 1.5;
    padding: 12px;
    border: 2px solid #333;
    background-color: #f9f9f9;
    color: #333;
    border-radius: 4px;
    box-shadow: none;
    outline: none;
    appearance: none; /* デフォルトのプルダウン矢印を非表示にする */
}

/* プルダウンのホバー効果 */
.wrapper .block #inputBlock select:hover {
    border-color: #23ac38;
    background-color: #e8f5e9;
}

/* プルダウン選択時の効果 */
.wrapper .block #inputBlock select:focus {
    border-color: #4CAF50;
    background-color: #e8f5e9;
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.5);
}

/* プルダウン用の矢印の追加 */
.wrapper .block #inputBlock select::after {
    content: "▼";
    font-size: 0.8em;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* 矢印部分のクリックを無効化 */
}

/* モバイルでのスタイル調整 */
@media screen and (max-width: 480px) {
    .wrapper .block #inputBlock select {
        font-size: 100%;
        padding: 8px 6px;
    }
}


.form_txt_l {
    width: 140px;
}


.badge input {appearance: auto;}



:root {
  --color-primary: #8b5cf6;
  --color-primary-dark: #7c3aed;
  --color-secondary: #ec4899;
  --color-accent: #f59e0b;
  --color-bg: #faf5ff;
  --color-card: #ffffff;
  --color-border: #e9d5ff;
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {

.hair-root {
  max-width: 1200px;
  margin: 0 auto;
}

.hair-header {
  text-align: center;
  margin-bottom: 32px;
}

.hair-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(139, 92, 246, 0.1);
}

.hair-header p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.hair-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .hair-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hair-card {
  background: var(--color-card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(139, 92, 246, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  border: 2px solid var(--color-border);
}

.hair-card-header {
  margin-bottom: 20px;
}

.hair-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.hair-card-caption {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.hair-field-label {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  display: block;
}

.hair-input-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

#imageInput {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 2px dashed var(--color-primary);
  border-radius: 8px;
  background: #faf5ff;
  cursor: pointer;
  transition: all 0.3s ease;
}

#imageInput:hover {
  border-color: var(--color-primary-dark);
  background: #f3e8ff;
}

.hair-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.hair-btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 6px rgba(139, 92, 246, 0.3);
}

.hair-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(139, 92, 246, 0.4);
}

.hair-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hair-status {
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 0.9rem;
}

.hair-status.muted {
  background: #f3f4f6;
  color: var(--color-text-light);
}

.hair-status.ok {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--color-success);
}

.hair-status.err {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--color-error);
}

#previewWrap { display: none; }

#previewArea {
  position: relative;
  width: 100%;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 12px;
}

#previewArea img {
  width: 100%;
  height: auto;
  display: block;
}

#previewArea canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.small-note {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 8px;
}

.color-swatch {
  display: inline-block;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: #faf5ff;
  border-radius: 12px;
  margin: 16px 0;
}

.color-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.color-code {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 600;
}

.color-label {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.hair-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--color-border);
  margin: 20px 0 16px;
  flex-wrap: wrap;
}

.hair-tab {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text-light);
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.hair-tab:hover {
  color: var(--color-primary);
}

.hair-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.hair-tabpanel > div {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.color-category-badge {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  border-radius: 20px;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 12px 0;
}

.brightness-scale {
  margin: 16px 0;
}

.brightness-bar {
  height: 24px;
  background: linear-gradient(to right, #000000, #3d2817, #6b4423, #9d7554, #c4a47a, #f5deb3, #ffefd5, #ffffff);
  border-radius: 12px;
  position: relative;
  margin: 8px 0;
}

.brightness-indicator {
  position: absolute;
  top: -8px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid var(--color-primary);
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.recommendation-item {
  text-align: center;
  padding: 12px;
  background: white;
  border-radius: 12px;
  border: 2px solid var(--color-border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.recommendation-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(139, 92, 246, 0.2);
  border-color: var(--color-primary);
}

.recommendation-color {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 8px;
  border: 3px solid #e5e7eb;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.recommendation-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 4px;
}

.recommendation-desc {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

.slider-control {
  margin: 16px 0;
}

.slider-control label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.slider-control input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--color-border);
  outline: none;
  -webkit-appearance: none;
}

.slider-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-control input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-value {
  display: inline-block;
  margin-left: 12px;
  font-weight: 600;
  color: var(--color-primary);
}

#simulationCanvas {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 12px;
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.palette-item {
  text-align: center;
}

.palette-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.palette-swatch:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.palette-label {
  font-size: 0.7rem;
  color: var(--color-text-light);
}

.hair-footer {
  text-align: center;
  margin-top: 32px;
  padding: 20px;
  color: var(--color-text-light);
  font-size: 0.85rem;
  line-height: 1.8;
}

.compatibility-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 12px;
  font-size: 0.8rem;
  margin: 4px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .hair-header h1 {
    font-size: 1.5rem;
  }
  
  .recommendation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}