/* ── CSS Custom Properties（限定在组件和 modal 范围内） ── */
.stick-customizer,
#modal-overlay {
  --cyan-glow: rgba(56, 189, 248, 0.25);
  --font-ui: "Lato", "Roboto", "Zen Kaku Gothic New", system-ui, sans-serif;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --blue: #3574c0;
}

/* ── Stick customizer card ── */
.stick-customizer {
  width: 100%;
  border-radius: 20px;
  padding: 30px;
  border: none;
  position: relative;
  animation: sc-cardIn 0.6s var(--ease-spring) both;
  height: fit-content !important;
}

/* ── Typography ── */
.stick-customizer .title {
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0;
  line-height: 1.4;
  text-align: left;
  margin-bottom: 20px;
  position: relative;
  animation: sc-fadeUp 0.5s 0.1s var(--ease-spring) both;
}

.stick-customizer .description {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0;
  line-height: 1.6;
  text-align: left;
  margin-bottom: 30px;
  position: relative;
  animation: sc-fadeUp 0.5s 0.2s var(--ease-spring) both;
}

.stick-customizer .highlights {
  margin-bottom: 40px;
  position: relative;
  animation: sc-fadeUp 0.5s 0.3s var(--ease-spring) both;
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
  color: #47c3ff;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  text-shadow: 0 0 24px var(--cyan-glow);
}

/* ── Feature grid ── */
.stick-customizer .feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
}

.stick-customizer .feature-card {
  background: linear-gradient(to right, rgba(255, 24, 24, 0.2) 0%, rgba(183, 122, 255, 0.2) 66%, rgba(104, 205, 255, 0.2) 100%);
  border-radius: 20px;
  padding: 24px;
  height: 150px;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.28s var(--ease-spring),
    box-shadow 0.28s var(--ease-spring);
  opacity: 0;
  animation: sc-cardFadeUp 0.5s var(--ease-spring) forwards;
}

.stick-customizer .feature-card:nth-child(1) {
  animation-delay: 0.35s;
}
.stick-customizer .feature-card:nth-child(2) {
  animation-delay: 0.45s;
}
.stick-customizer .feature-card:nth-child(3) {
  animation-delay: 0.55s;
}
.stick-customizer .feature-card:nth-child(4) {
  animation-delay: 0.65s;
}

.stick-customizer .feature-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow:
    0 24px 48px rgba(56, 189, 248, 0.32),
    0 8px 16px rgba(0, 0, 0, 0.25);
}

.stick-customizer .card-top {
  position: relative;
  z-index: 1;
}

.stick-customizer .card-title {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  letter-spacing: 0;
  margin-bottom: 10px;
  display: block;
}

.stick-customizer .card-desc {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: #cfd8dc;
  line-height: 1.6;
  letter-spacing: 0;
}

.stick-customizer .card-icon {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.stick-customizer .card-icon svg {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
  transition: transform 0.25s ease;
}

.stick-customizer .card-icon img {
  width: 30px;
  height: 25px;
}

.stick-customizer .feature-card:hover .card-icon svg {
  transform: scale(1.12);
}

/* ── Keyframes ── */
@keyframes sc-cardIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sc-fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sc-cardFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .stick-customizer {
    padding: 36px 28px 32px;
  }
  .stick-customizer .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stick-customizer {
    padding: 28px 18px 32px;
    border-radius: 0;
    box-shadow: none;
  }
  .stick-customizer .title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0;
    margin-bottom: 10px;
  }
  .stick-customizer .description {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0;
    margin-bottom: 20px;
  }
  .stick-customizer .highlights {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0;
    margin-bottom: 20px;
  }
  .stick-customizer .highlight-line {
    font-size: 0.85rem;
    line-height: 1.85;
  }
  .stick-customizer .feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .stick-customizer .feature-card {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    height: auto;
    padding: 10px 20px;
    border-radius: 15px;
    gap: 20px;
  }
  .stick-customizer .feature-card:hover {
    transform: translateY(-3px) scale(1.005);
  }
  .stick-customizer .card-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    flex: 1;
  }
  .stick-customizer .card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
    letter-spacing: 0;
  }
  .stick-customizer .card-desc {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0;
  }
  .stick-customizer .pc-br {
    display: none;
  }
  .stick-customizer .card-icon {
    flex-shrink: 0;
    align-items: center;
  }
  .stick-customizer .card-icon svg {
    width: 32px;
    height: 32px;
  }
  .stick-customizer .card-icon img {
    width: 30px;
    height: 25px;
  }
}

/* ════════════════════════════════════════════
   Modal
════════════════════════════════════════════ */
#modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#modal-overlay.active {
  display: flex;
}

#modal-overlay .modal-box {
  background: #fff;
  border-radius: 20px;
  width: 90vw;
  max-width: 960px;
  max-height: 88vh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: sc-modalIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

#modal-overlay .modal-content {
  overflow-y: auto;
  overflow-x: auto;
  flex: 1;
  padding: 52px 76px 40px;
}
#modal-overlay .modal-content::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}

#modal-overlay .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1d1d1f;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.15s;
  flex-shrink: 0;
}
#modal-overlay .modal-close:hover {
  background: #3a3a3c;
}

#modal-overlay .modal-panel[hidden] {
  display: none;
}

@keyframes sc-modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ════════════════════════════════════════════
   Panel: dead-zone (#panel-dz)
════════════════════════════════════════════ */
#panel-dz {
  font-family: "Noto Sans JP", sans-serif;
}

#panel-dz .dz-panel-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  color: #000;
  letter-spacing: 0;
  margin-bottom: 28px;
}
#panel-dz .dz-comparison {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
#panel-dz .dz-sequence {
  width: 100%;
  max-width: 748px;
  aspect-ratio: 748 / 320;
  margin: 0 auto;
}
#panel-dz .dz-seq-frame {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}
#panel-odz .slider-thumb {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  background: var(--blue);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}
#panel-odz .slider-vis {
  width: 144px;
  height: 20px;
  background: #c2d8e5;
  border-radius: 10px;
  position: relative;
}
#panel-odz .odz-comp-label {
  font-size: 16px;
  font-weight: 400;
  color: #000;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
#panel-odz .odz-comp-label::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
  flex-shrink: 0;
}
#panel-dz .dz-desc-box {
  background: #d9d9d9;
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 8px;
}
#panel-dz .dz-desc-title {
  font-size: 14px;
  font-weight: 700;
  color: #000;
  line-height: 1.6;
  margin-bottom: 14px;
}
#panel-dz .dz-desc-section {
  margin-bottom: 12px;
  font-size: 14px;
  color: #000;
  line-height: 1.6;
}
#panel-dz .dz-desc-section:last-child {
  margin-bottom: 0;
}
#panel-dz .dz-desc-section p {
  margin-bottom: 2px;
}
#panel-dz .dz-desc-section strong {
  font-weight: 500;
}
#panel-dz .dz-bullet {
  font-weight: 400;
}

/* ════════════════════════════════════════════
   Panel: outer-dead-zone (#panel-odz)
════════════════════════════════════════════ */
#panel-odz {
  font-family: "Noto Sans JP", sans-serif;
}

#panel-odz .odz-panel-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  color: #000;
  letter-spacing: 0;
  margin-bottom: 28px;
}
#panel-odz .odz-comparison {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
#panel-odz .odz-sequence {
  width: 100%;
  max-width: 748px;
  aspect-ratio: 748 / 320;
  margin: 0 auto;
}
#panel-odz .odz-seq-frame {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}
#panel-odz .odz-comp-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#panel-odz .odz-inner-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}
#panel-odz canvas {
  display: block;
  cursor: grab;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#panel-odz input[type="range"][hidden] {
  display: none;
}
#panel-odz .odz-comp-note {
  font-size: 12px;
  font-weight: 300;
  color: #000;
  letter-spacing: 0;
}
#panel-odz .char-cell {
  width: 113px;
  height: 182px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}
#panel-odz .char-after .motion-img {
  position: absolute;
  bottom: 0;
  left: 50%;
  height: 182px;
  width: auto;
  opacity: 0;
  transform: translate(-50%, 0);
  pointer-events: none;
  will-change: opacity;
}
#panel-odz .progress-bar {
  width: 144px;
  height: 20px;
  border-radius: 10px;
  background: #d9d9d9;
  position: relative;
}
#panel-odz .odz-desc-box {
  background: #d9d9d9;
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 8px;
}
#panel-odz .odz-desc-title {
  font-size: 14px;
  font-weight: 700;
  color: #000;
  line-height: 1.6;
  margin-bottom: 14px;
}
#panel-odz .odz-desc-section {
  margin-bottom: 12px;
  font-size: 14px;
  color: #000;
  line-height: 1.6;
}
#panel-odz .odz-desc-section:last-child {
  margin-bottom: 0;
}
#panel-odz .odz-desc-section p {
  margin-bottom: 2px;
}
#panel-odz .odz-desc-section strong {
  font-weight: 500;
}
#panel-odz .odz-bullet {
  font-weight: 400;
}

/* ── Shared: #panel-odz ── */
#panel-odz .joy-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
#panel-odz .canvas-wrap {
  position: relative;
}
#panel-odz .canvas-fg {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#panel-odz canvas:active {
  cursor: grabbing;
}
#panel-odz .char-after {
  position: relative;
}
#panel-odz .char-after .motion-img.active {
  opacity: 1;
}
#panel-odz .char-after .motion-img.fading {
  animation: sc-trail-fade 260ms ease-out forwards;
}
#panel-odz .char-display {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
#panel-odz .progress-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  background: #ff0000;
  border-radius: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 0%;
  transition: left 0.06s linear;
}

@keyframes sc-trail-fade {
  0% {
    opacity: 1;
  }
  25% {
    opacity: 0.45;
  }
  60% {
    opacity: 0.45;
  }
  100% {
    opacity: 0;
  }
}

/* ════════════════════════════════════════════
   Panel: response-curve (#panel-rc)
════════════════════════════════════════════ */
#panel-rc {
  font-family: "Noto Sans JP", sans-serif;
}

#panel-rc .rc-panel-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  color: #000;
  letter-spacing: 0;
  margin-bottom: 28px;
}
#panel-rc .rc-comparison {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
#panel-rc .rc-sequence {
  width: 100%;
  max-width: 748px;
  aspect-ratio: 748 / 320;
  margin: 0 auto;
}
#panel-rc .rc-seq-frame {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

#panel-rc .rc-desc-box {
  background: #d9d9d9;
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 24px;
  max-width: 728px;
  margin-left: auto;
  margin-right: auto;
}
#panel-rc .rc-desc-title {
  font-size: 14px;
  font-weight: 700;
  color: #000;
  line-height: 1.6;
  margin: 0 0 14px;
}
#panel-rc .rc-desc-section {
  margin-bottom: 12px;
  font-size: 14px;
  color: #000;
  line-height: 1.6;
}
#panel-rc .rc-desc-section:last-child {
  margin-bottom: 0;
}
#panel-rc .rc-desc-section p {
  margin: 0 0 2px;
}
#panel-rc .rc-desc-section strong {
  font-weight: 500;
}
#panel-rc .rc-bullet {
  font-weight: 400;
}

/* ════════════════════════════════════════════
   Panel: opposite (#panel-op)
════════════════════════════════════════════ */
#panel-op {
  font-family: "Noto Sans JP", sans-serif;
}

#panel-op .op-header {
  position: relative;
  text-align: center;
  margin-bottom: 28px;
}
#panel-op .op-panel-title {
  font-size: 24px;
  font-weight: 600;
  color: #000;
  letter-spacing: 0;
  margin: 0;
}
#panel-op .op-comparison {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
#panel-op .op-sequence {
  width: 100%;
  max-width: 748px;
  aspect-ratio: 748 / 320;
  margin: 0 auto;
}
#panel-op .op-seq-frame {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}
#panel-op .op-desc-box {
  background: #d9d9d9;
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 24px;
  max-width: 728px;
  margin-left: auto;
  margin-right: auto;
}
#panel-op .op-desc-title {
  font-size: 14px;
  font-weight: 700;
  color: #000;
  line-height: 1.6;
  margin: 0 0 14px;
}
#panel-op .op-desc-section {
  margin-bottom: 12px;
  font-size: 14px;
  color: #000;
  line-height: 1.6;
}
#panel-op .op-desc-section:last-child {
  margin-bottom: 0;
}
#panel-op .op-desc-section p {
  margin: 0 0 2px;
}
#panel-op .op-desc-section strong {
  font-weight: 500;
}
#panel-op .op-bullet {
  font-weight: 400;
}

/* ════════════════════════════════════════════
   Mobile Modal & Panel overrides
════════════════════════════════════════════ */
@media (max-width: 480px) {
  #modal-overlay {
    padding: 28px 10px;
  }
  #modal-overlay .modal-box {
    max-width: 100%;
    width: 100%;
    max-height: 100%;
    height: fit-content;
    border-radius: 20px;
  }
  #modal-overlay .modal-content {
    padding: 58px 6.25%;
  }

  /* ── ODZ mobile ── */
  #panel-odz .odz-comparison {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
  #panel-odz .odz-inner-row {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    justify-content: center;
  }
  #panel-odz canvas {
    width: 120px;
    height: 120px;
  }
  #panel-odz .joy-wrap {
    gap: 6px;
  }
  #panel-odz .char-cell {
    width: 70px;
    height: 120px;
  }
  #panel-odz .char-after .motion-img {
    height: 120px;
  }
  #panel-odz .progress-bar {
    width: 120px;
    height: 10px;
    border-radius: 5px;
  }
  #panel-odz .progress-dot {
    width: 10px;
    height: 10px;
  }

  /* ── ODZ slider mobile ── */
  #panel-odz .slider-vis {
    width: 120px;
    height: 10px;
    border-radius: 5px;
  }
  #panel-odz .slider-thumb {
    width: 10px;
    height: 10px;
  }
  #panel-odz .odz-comp-group:first-child .slider-thumb {
    left: 5px !important;
  }
  #panel-odz .odz-comp-group:last-child .slider-thumb {
    left: calc(100% - 5px) !important;
  }

  /* ── ODZ only ── */
  #panel-odz .odz-panel-title {
    font-size: 18px;
    margin-bottom: 18px;
  }
  #panel-odz .odz-desc-box {
    padding: 14px 16px;
  }

  /* ── OP mobile ── */
  #panel-op .grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
    scrollbar-width: none;
    flex-direction: column;
  }
  #panel-op .grid::-webkit-scrollbar {
    display: none;
  }
  #panel-op .col {
    flex-shrink: 0;
    scroll-snap-align: start;
    width: calc(87.5vw - 17.5px);
  }
  #panel-op .game-wrap {
    grid-column: 1 / -1;
  }

  /* ── RC mobile ── */
  #panel-rc .rc-panel-title {
    font-size: 18px;
    margin-bottom: 18px;
  }
  #panel-rc .rc-desc-box {
    padding: 14px 16px;
    margin-top: 20px;
  }

  #panel-op .op-panel-title {
    font-size: 18px;
  }
  #panel-op .op-header {
    margin-bottom: 18px;
  }
  #panel-op .op-desc-box {
    padding: 14px 16px;
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  #panel-rc .rc-sequence {
    aspect-ratio: 370 / 900;
    max-width: 370px;
  }
}
