/* 投票ページの 3D の枠（ショーウィンドウ）・表示設定・手で振る（位置は vote-flow.css で決める） */
/* ショーウィンドウ：上からのスポットライトと、ガラスの映り込み */
.showcase-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 55% at 50% 0%, #a0afff5c, transparent 70%),
    radial-gradient(ellipse 70% 30% at 50% 100%, #5b6cff40, transparent 70%),
    linear-gradient(#272e4e, #0f1322 78%);
}
.showcase-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 28%,
    #ffffff12 36%,
    transparent 44%,
    transparent 62%,
    #ffffff0a 66%,
    transparent 70%
  );
}
.showcase-fallback {
  position: absolute;
  inset: 10%;
  width: 80%;
  height: 80%;
  object-fit: contain;
  border-radius: 14px;
  transition: opacity 0.35s;
  -webkit-user-drag: none;
}
.showcase-stage.is-3d .showcase-fallback {
  opacity: 0;
}
.showcase-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* 表示設定：3D の右上の ⚙ と、開くと出る毛玻璃のパネル。3D が出ていないとき（WebGL なし・読み込み中）は出さない */
.showcase-tune {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  text-shadow: 0 1px 6px #0006;
  opacity: 0.82;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.3s;
}
.showcase-tune:hover,
.showcase-tune[aria-expanded='true'] {
  background: none;
  opacity: 1;
  transform: rotate(30deg);
}
.showcase-tune:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 8px;
}
.showcase-panel {
  position: absolute;
  top: 58px;
  right: 12px;
  z-index: 4;
  display: grid;
  gap: 6px;
  width: min(240px, calc(100% - 24px));
  max-height: calc(100% - 70px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px;
  border: 1px solid #ffffff2e;
  border-radius: 16px;
  background: #141a3066;
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 12px 30px #05081a59;
  color: #fff;
  font-size: 12px;
  cursor: default;
  touch-action: pan-y;
}
/* 流砂の「手で振る」：3D の右下。押すと揺れて中の砂が流れる */
.showcase-shake {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  padding: 8px 16px;
  border: 1px solid #ffffff2e;
  border-radius: 999px;
  background: #ffffff1f;
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s;
}
.showcase-shake:hover {
  background: #ffffff3d;
}
.showcase-shake:active {
  background: #ffffff52;
}
.showcase-stage:not(.is-3d) .showcase-shake,
.showcase-panel[hidden],
.showcase-stage:not(.is-3d) .showcase-tune,
.showcase-stage:not(.is-3d) .showcase-panel {
  display: none;
}
.showcase-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.showcase-panel-head strong {
  font-size: 13px;
}
.showcase-panel-head button {
  padding: 4px 10px;
  border: 1px solid #ffffff40;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.showcase-field {
  display: grid;
  gap: 0;
}
.showcase-field span {
  display: flex;
  justify-content: space-between;
  color: #d5d9f3;
}
.showcase-field output {
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.showcase-field select {
  width: 100%;
  margin-top: 4px;
  padding: 5px 8px;
  border: 1px solid #ffffff33;
  border-radius: 8px;
  background: #ffffff1a;
  color: #fff;
  font: inherit;
}
.showcase-field select option {
  color: #1d2535;
}
.showcase-field input[type='range'] {
  width: 100%;
  margin: 2px 0;
  accent-color: #8ea2ff;
}

/* 3D の操作の案内（投票ページ、vote-flow.css で位置を決める） */
.showcase-hint {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffffff1f;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #e6e9ff;
  font-size: 12px;
  pointer-events: none;
}
.showcase-stage:not(.is-3d) .showcase-hint {
  display: none;
}
