/* ORPHE INSOLE Showcase */

html {
  /* --showcase-header-offset は app.js がヘッダー実高から更新する（EN表示や狭幅で2行になるため）。
     body 指定では無効（スクロールコンテナは html）。ここが唯一のアンカーオフセットで、
     section 側の scroll-margin と併用すると二重になるため付けないこと */
  scroll-padding-top: var(--showcase-header-offset, 70px);
}

.showcase-header {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.showcase-header nav a {
  color: #9fb6c3;
  text-decoration: none;
}

.showcase-header nav a:hover {
  color: #fff;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #2b3a44;
  border-radius: 999px;
  background: #10171c;
}

.language-switch button {
  min-width: 44px;
  min-height: 28px;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  color: #9fb6c3;
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.language-switch button.active {
  color: #051314;
  background: #45e6e6;
}

.language-switch button:focus-visible {
  outline: 2px solid #ff6040;
  outline-offset: 2px;
}

.hero-product-image {
  display: block;
  width: min(100%, 24rem);
  height: auto;
  margin: 1.25rem auto 1rem;
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.35));
}

.section-title {
  font-size: 1.4rem;
  color: #45e6e6;
}

.section-title.justify-content-center {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

/* --- デバイス別パネル（圧力/IMU/Euler、L/Rで並び替え） --- */
.device-panel .panel-label {
  font-size: 0.8rem;
  color: #9fb6c3;
  margin-bottom: 0.5rem;
}

.device-panel .panel-label .device-name {
  font-weight: 700;
}

/* --- 購入導線 --- */
.buy-card {
  background: #10171c;
  border: 1px solid #5c4a16;
  border-radius: 8px;
  padding: 1.25rem;
}


.section-desc {
  max-width: 52rem;
}

.mono {
  font-family: SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.spec-table th {
  width: 38%;
  font-weight: 600;
  color: #9fb6c3;
}

.connect-steps li {
  margin-bottom: 0.5rem;
}

.connect-note-card {
  height: 100%;
  background: #10171c;
  border: 1px solid #2b3a44;
  border-radius: 8px;
  padding: 1rem;
}

.connect-note-card li {
  margin-bottom: 0.45rem;
}

.connect-note-card li:last-child {
  margin-bottom: 0;
}

/* --- コードスニペット --- */
.snippet-block {
  position: relative;
}

.snippet-title {
  font-size: 0.75rem;
  color: #9fb6c3;
  margin-bottom: 0.25rem;
}

.snippet {
  background: #10171c;
  border: 1px solid #2b3a44;
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: #d7e3ea;
  overflow-x: auto;
}

.copy-btn {
  position: absolute;
  top: 1.4rem;
  right: 0.5rem;
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
}

/* --- 足型マップ（hula-motion-sonifier の手法を流用） --- */
.insole-map {
  position: relative;
  width: min(100%, 170px);
  aspect-ratio: 0.411 / 1;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.4));
}

.insole-map.is-left {
  background-image: url("./assets/orphe-insole-left.png");
}

.insole-map.is-right {
  background-image: url("./assets/orphe-insole-right.png");
}

.sensor-dot {
  position: absolute;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  background: #234;
  transition: background-color 60ms linear;
}

.cop-dot {
  position: absolute;
  z-index: 2;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #45e6e6;
  transform: translate(-50%, -50%);
  transition: left 90ms linear, top 90ms linear;
  display: none;
}

.cop-legend {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #45e6e6;
  vertical-align: -1px;
}

.pressure-load-card,
.statokinesigram-card {
  background: #10171c;
  border: 1px solid #2b3a44;
  border-radius: 8px;
  padding: 1rem;
}

.fifo-card {
  background: #10171c;
  border-color: #2b3a44 !important;
}

.pressure-total-track,
.pressure-side-track {
  position: relative;
  overflow: hidden;
  background: #071015;
  border: 1px solid #2b3a44;
}

.pressure-total-track {
  height: 18px;
  border-radius: 9px;
}

.pressure-side-track {
  height: 10px;
  border-radius: 5px;
}

.pressure-total-fill,
.pressure-side-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d4f8b 0%, #45e6e6 48%, #ff6040 100%);
  transition: width 90ms linear;
}

.pressure-side-fill.right {
  background: linear-gradient(90deg, #2d77b8 0%, #45e6e6 52%, #ff8a40 100%);
}

.statokinesigram-card canvas {
  display: block;
  width: 100%;
  background: #071015;
  border: 1px solid #2b3a44;
  border-radius: 6px;
}

/* --- 3D --- */
#canvas3d_placeholder {
  width: 100%;
  background: #10171c;
  border: 1px solid #2b3a44;
  border-radius: 6px;
  overflow: hidden;
}

#canvas3d_placeholder canvas {
  display: block;
}

/* --- Euler ゲージ --- */
.euler-gauge {
  display: grid;
  grid-template-columns: 3rem 1fr 4rem;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.gauge-track {
  position: relative;
  height: 10px;
  background: #10171c;
  border: 1px solid #2b3a44;
  border-radius: 5px;
}

.gauge-track::after {
  /* 中央(0°)の目印 */
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: #2b3a44;
}

.gauge-bar {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 50%;
  width: 0;
  background: #45e6e6;
  border-radius: 4px;
}

/* --- ヘッダーのホームリンク --- */
.header-home-link {
  color: #fff;
  text-decoration: none;
}

.header-home-link:hover {
  color: #45e6e6;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header-home-link:hover .text-muted {
  color: #45e6e6 !important;
}

/* --- 関連 example リンク（各セクション末尾のチップ） --- */
.related-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.related-label {
  color: #9fb6c3;
  font-size: 0.85rem;
  white-space: nowrap;
}

.related-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  border: 1px solid #2b3a44;
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.85rem;
  color: #d7e3ea;
  text-decoration: none;
  background: #10171c;
}

.related-link:hover {
  border-color: #45e6e6;
  color: #fff;
}

.related-link strong {
  color: #45e6e6;
  white-space: nowrap;
}

/* --- 次のステップ（サムネイル付きカード） --- */
.next-card {
  display: block;
  height: 100%;
  border: 1px solid #2b3a44;
  border-radius: 8px;
  color: #d7e3ea;
  text-decoration: none;
  background: #10171c;
  overflow: hidden;
}

.next-card:hover {
  border-color: #45e6e6;
  color: #fff;
}

.next-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0b1116;
  border-bottom: 1px solid #2b3a44;
}

.next-body {
  padding: 0.75rem;
}
