/*
 * 色温度シミュレーター 固有の見た目。
 * 色・文字・ヒーロー・カード・節・関連リンクは /site-chrome/tool-ui.css（全ツール共通）にある。
 */

/* 部屋の絵と説明を2列に並べるため、本文幅を少し広げる */
.tu-page {
  --tu-width: 960px;
}

/* JS が商品コーナーなどの hidden を付け外しする。部品側の display 指定より優先する */
.ct-page [hidden] {
  display: none !important;
}

.ct-noscript {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--tu-danger-line);
  border-left: 4px solid var(--tu-accent);
  border-radius: var(--tu-radius-control);
  background: var(--tu-danger-bg);
  color: #8e2219;
  font-weight: 700;
}

/* ── 色温度の選択 ── */
.ct-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
}

.ct-kelvin-value {
  color: var(--tu-key);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.ct-class-name {
  font-size: 1.15rem;
  font-weight: 700;
}

.ct-slider-wrap {
  position: relative;
}

/* 色温度の向きが分かるよう、2700K の橙色から 5000K の白、6500K の青白へのグラデーションを敷く
   白の位置 60% は (5000 - 2700) / (6500 - 2700) */
.ct-track-extras {
  position: relative;
  height: 14px;
  /* スライダーのつまみの中心が動く範囲に合わせる（つまみの幅の半分だけ内側へ） */
  margin: 0 8px;
  border: 1px solid var(--tu-line);
  border-radius: 999px;
  background: linear-gradient(to right, #ffc06f, #ffffff 60%, #d0e1ff);
}

/* 照明で出せる範囲。グラデーションが見えるよう枠線だけにする */
.ct-band {
  position: absolute;
  top: -4px;
  bottom: -4px;
  border: 2px solid var(--tu-main);
  border-radius: var(--tu-radius-control);
}

.ct-ticks {
  position: absolute;
  inset: 0;
}

.ct-tick {
  position: absolute;
  top: 0;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  background: var(--tu-muted);
}

.ct-slider {
  width: 100%;
  margin: 4px 0;
  accent-color: var(--tu-main);
}

.ct-scale {
  display: flex;
  justify-content: space-between;
  color: var(--tu-muted);
  font-size: .8rem;
}

.ct-band-caption {
  margin: 6px 0 0;
  color: var(--tu-key);
  font-size: .85rem;
}

.ct-band-caption:empty {
  display: none;
}

/* ── 部屋の見え方 ── */
.ct-view {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 0 0 20px;
}

.ct-room {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--tu-line);
  border-radius: var(--tu-radius-card);
  line-height: 0;
}

.ct-room img {
  display: block;
  width: 100%;
  height: auto;
}

/* 光の色を乗算で重ねる（5000K のときは白なので元の画像のまま） */
.ct-room-tint {
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
}

.ct-info {
  margin: 0;
}

.ct-swatch {
  display: block;
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
  border: 1px solid var(--tu-line);
  border-radius: 50%;
}

.ct-scene {
  margin: 0;
}

/* 色の付け方の注意。読み物より控えめに置く */
.ct-note {
  margin: 0 0 24px;
  padding: 12px 16px;
  border-left: 4px solid var(--tu-main);
  background: var(--tu-surface);
  color: var(--tu-muted);
  font-size: .85rem;
}

.ct-note p {
  margin: 0 0 4px;
}

.ct-note p:last-child {
  margin-bottom: 0;
}

/* ── 照明の商品（日本語版だけ。JS が中身を組み立てる） ── */
.ct-pr {
  margin: -6px 0 12px;
  color: var(--tu-muted);
  font-size: .8rem;
}

.ct-tatami {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.ct-tatami button {
  min-height: 40px;
  padding: 6px 16px;
  border: 1px solid var(--tu-control-line);
  border-radius: var(--tu-radius-control);
  background: var(--tu-surface);
  color: var(--tu-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ct-tatami button:hover {
  border-color: var(--tu-main);
  color: var(--tu-key);
}

.ct-tatami button[aria-pressed="true"] {
  border-color: var(--tu-main);
  background: var(--tu-main);
  color: #ffffff;
}

.ct-product-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-product {
  padding: 14px 16px;
  border: 1px solid var(--tu-line);
  border-radius: var(--tu-radius-card);
  background: var(--tu-surface);
}

.ct-product p {
  margin: 0 0 6px;
}

.ct-product-name {
  color: var(--tu-key);
  font-weight: 700;
}

.ct-product-spec,
.ct-product-checked {
  color: var(--tu-muted);
  font-size: .85rem;
}

.ct-product-show {
  margin-bottom: 8px;
  padding: 4px 12px;
  border: 1px solid var(--tu-control-line);
  border-radius: var(--tu-radius-control);
  background: var(--tu-sub);
  color: var(--tu-key);
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}

.ct-product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ct-product-links a {
  font-weight: 700;
}

.ct-product-empty {
  margin: 0;
  color: var(--tu-muted);
}

/* 照明のメーカーの紹介。一覧の下に控えめに置く */
.ct-maker-notes {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--tu-radius-control);
  background: var(--tu-sub);
}

.ct-maker-notes h3 {
  margin: 0 0 4px;
  color: var(--tu-key);
  font-size: .9rem;
}

.ct-maker-notes p {
  margin: 0;
  font-size: .85rem;
}

.ct-maker-notes p + h3 {
  margin-top: 10px;
}

/* 読み物は行を長くしすぎない */
.ct-page .tu-links {
  max-width: 44em;
}

@media (max-width: 720px) {
  .ct-view {
    grid-template-columns: 1fr;
  }

  .ct-kelvin-value {
    font-size: 1.7rem;
  }
}
