/* カルーセルの操作部。寸法と色は Apple の .all-access-pass の値(2026-11-06 実測)。
   HTML は src/lib/carouselControls.ts、動きは src/motion/carouselControls.ts のバネ */
.ap-cc-wrap { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: center; overflow: clip; pointer-events: none; }
.ap-cc-wrap--static { position: relative; inset: auto; margin-top: 32px; }
.ap-cc { --cc-pw: 48px; position: sticky; bottom: 32px; display: flex; align-items: center; margin: var(--cc-top, 380px) 0 var(--cc-bottom, 120px); pointer-events: auto; will-change: transform; }
.ap-cc--static { position: relative; bottom: auto; margin: 0; }
.ap-cc-intro { position: absolute; top: 0; left: 50%; width: 56px; height: 56px; border-radius: 56px; background: rgb(232 232 237); opacity: 0; transform: translateX(-50%) scale(0.01); pointer-events: none; }
.ap-cc-bubble { --alpha: 1; position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; box-sizing: border-box; min-height: 56px; border-radius: 28px; }
.ap-cc-playwrap { width: 56px; height: 56px; margin-inline-start: 16px; }
.ap-cc-bg { --scale: 1; position: absolute; top: 50%; left: 50%; z-index: -1; width: 100%; height: 56px; border-radius: 28px; background: rgb(232 232 237 / calc(1 - var(--alpha) * 0.28)); -webkit-backdrop-filter: blur(calc(7px * (2 - var(--alpha)))); backdrop-filter: blur(calc(7px * (2 - var(--alpha)))); transform: translate(-50%, -50%) scale(var(--scale)); will-change: transform; }
.ap-cc-dots { display: flex; align-items: center; margin: 0; padding: 0 16px; list-style: none; line-height: 0; }
.ap-cc-dots li { display: flex; margin-inline: 8px; }
.ap-cc-dot { --d: calc(var(--i) - var(--cc-p, 0)); --abs: max(var(--d), -1 * var(--d)); --ex: min(1 - var(--abs), 1); position: relative; display: block; overflow: hidden; width: 8px; min-width: calc((var(--cc-pw) - 8px) * var(--ex) * var(--progress-intro, 1) + 8px); max-width: var(--cc-pw); height: 8px; margin: 0; padding: 0; border: 0; border-radius: 10px; background: rgba(0, 0, 0, 0.42); cursor: pointer; transition: background-color 0.25s linear; }
.ap-cc-dot:hover:not(.is-current) { background: rgba(0, 0, 0, 0.54); }
.ap-cc-dot.is-current { cursor: default; }
.ap-cc-fill { position: absolute; top: 0; inset-inline-start: 0; display: none; width: calc(var(--fill, 0) * 115%); min-width: 15%; height: 100%; margin-inline-start: -15%; border-radius: 10px; background: #29292a; }
.ap-cc-dot.is-current .ap-cc-fill { display: block; }
.ap-cc-play { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 32px; background: transparent; color: #1d1d1f; cursor: pointer; transition: background-color 0.1s linear; }
.ap-cc-play:hover { background: rgba(223, 223, 227, 0.698); }
.ap-cc-play:active { background: rgba(193, 193, 198, 0.654); }
.ap-cc-play svg { display: none; width: 100%; height: 100%; fill: currentColor; }
.ap-cc-play[data-state="playing"] .ap-cc-i-pause, .ap-cc-play[data-state="paused"] .ap-cc-i-play, .ap-cc-play[data-state="ended"] .ap-cc-i-replay { display: block; }

/* 暗い背景用。色は Apple の実測ではなく、明るい版の濃さを白黒反転した値 */
.ap-cc--dark .ap-cc-intro { background: rgb(66 66 69); }
.ap-cc--dark .ap-cc-bg { background: rgb(66 66 69 / calc(1 - var(--alpha) * 0.28)); }
.ap-cc--dark .ap-cc-dot { background: rgba(255, 255, 255, 0.42); }
.ap-cc--dark .ap-cc-dot:hover:not(.is-current) { background: rgba(255, 255, 255, 0.54); }
.ap-cc--dark .ap-cc-fill { background: #f5f5f7; }
.ap-cc--dark .ap-cc-play { color: #f5f5f7; }
.ap-cc--dark .ap-cc-play:hover { background: rgba(82, 82, 86, 0.698); }
.ap-cc--dark .ap-cc-play:active { background: rgba(110, 110, 115, 0.654); }

@media (prefers-reduced-motion: no-preference) {
  html.w-mod-js .ap-cc-bubble { opacity: 0; }
  html.w-mod-js .ap-cc.is-activated .ap-cc-bubble { opacity: 1; }
  html.w-mod-js .ap-cc-dots li { opacity: 0; }
  html.w-mod-js .ap-cc.is-activated .ap-cc-dots li { opacity: 1; transition: opacity 0.1s ease-in 0.74s; }
  html.w-mod-js .ap-cc-play { opacity: 0; transform: scale(0.5); }
  html.w-mod-js .ap-cc.is-activated .ap-cc-play { opacity: 1; transform: scale(1); transition: background-color 0.1s linear, opacity 0.1s ease-in 0.94s, transform 0.2s ease-out 0.94s; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-cc-intro { display: none; }
}
@media (max-width: 734px) {
  .ap-cc { --cc-pw: 32px; bottom: 20px; max-width: calc(100vw - 40px); margin: var(--cc-top, 340px) 0 var(--cc-bottom, 56px); }
  .ap-cc--static { bottom: auto; margin: 0; }
}
