/* SPOT-ONE サンプル閲覧用の共通ツールバー。
   各サンプルの独自スタイルと衝突しないよう、色は var() を使わず直書きし、
   クラス名はすべて .so- プレフィックスで隔離している。 */

.so-fab,
.so-panel {
  all: initial;
  box-sizing: border-box;
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
}
.so-fab *,
.so-panel * {
  box-sizing: border-box;
  font-family: inherit;
}

.so-fab {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(18, 24, 28, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.15s ease, background 0.2s ease;
}
.so-fab:hover {
  background: rgba(18, 24, 28, 1);
  transform: translateY(-2px);
}
.so-fab .so-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e2452e;
  flex: none;
}
.so-fab .so-fab-sub {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

/* 狭い画面では、下部に積み重なるサンプル側のボタン群と重ならないよう、
   文字入りピルではなくアイコンのみの丸ボタンに折りたたむ */
@media (max-width: 480px) {
  .so-fab {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    left: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .so-fab .so-dot {
    width: 12px;
    height: 12px;
  }
  .so-fab .so-fab-label,
  .so-fab .so-fab-sub {
    display: none;
  }
  .so-panel {
    left: 12px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }
}

.so-panel {
  position: fixed;
  left: 16px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 2147483000;
  width: min(340px, calc(100vw - 32px));
  max-height: min(76vh, 600px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #12181c;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.so-panel.so-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.so-panel-head {
  padding: 16px 18px 14px;
  border-bottom: 1px solid #eee;
  flex: none;
}
.so-panel-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #e2452e;
  text-transform: uppercase;
}
.so-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.so-panel-title h2 {
  font-size: 15.5px;
  font-weight: 900;
  line-height: 1.4;
}
.so-panel-close {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #f2f0ea;
  color: #12181c;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.so-panel-close:hover {
  background: #e6e3da;
}

.so-versions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.so-versions a {
  flex: 1;
  text-align: center;
  padding: 7px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #ddd8ca;
  color: #3a464d;
}
.so-versions a.so-active {
  background: #12181c;
  color: #fff;
  border-color: #12181c;
}

.so-nav-row {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid #eee;
  flex: none;
}
.so-nav-row a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f6f4ee;
  color: #12181c;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}
.so-nav-row a:hover {
  background: #efece3;
}

.so-list {
  overflow-y: auto;
  padding: 8px 10px;
}
.so-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #12181c;
}
.so-list-item:hover {
  background: #f6f4ee;
}
.so-list-item.so-current {
  background: #fdeceb;
}
.so-list-item .so-cat {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e2452e;
  opacity: 0.35;
}
.so-list-item.so-current .so-cat {
  opacity: 1;
}
.so-list-item .so-txt {
  min-width: 0;
}
.so-list-item .so-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.so-list-item .so-meta {
  font-size: 11px;
  color: #8d9498;
  margin-top: 1px;
}

.so-panel-foot {
  flex: none;
  padding: 12px 18px 16px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.so-panel-foot a {
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  color: #3a464d;
}
.so-panel-foot a.so-cta {
  display: block;
  text-align: center;
  padding: 11px 14px;
  border-radius: 999px;
  background: #e2452e;
  color: #fff;
}
.so-panel-foot a.so-cta:hover {
  background: #b8331e;
}
.so-panel-foot a.so-home {
  color: #8d9498;
  text-align: center;
}
.so-panel-foot a.so-home:hover {
  color: #12181c;
}

/* サンプル本体のフッター（免責注記）がツールバーに隠れないよう余白を確保 */
body {
  padding-bottom: 76px;
}
