#section-4.home-section {
  position: relative;
  width: 100%;
  padding: clamp(80px, 8vw, 160px) 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.section-4__inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 80px);
}

.section-4__head {
  text-align: center;
  margin-bottom: clamp(48px, 5vw, 96px);
}

.section-4__title {
  margin: 0;
  color: var(--text);
  font-size: clamp(32px, 3.8vw, 64px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.section-4__monitor {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  aspect-ratio: 1414 / 756;
  background-image: url("../images/download/desktop-mockup.webp");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.section-4__screen {
  position: absolute;
  top: 4%;
  right: 9.7%;
  bottom: 10%;
  left: 10%;
  border-radius: clamp(2px, .3vw, 6px);
  overflow: hidden;
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2F8 100%);
}

.section-4__danmu-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.section-4__danmu {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, .8vw, 14px);
  font-family: inherit;
  padding: clamp(8px, .8vw, 14px) clamp(14px, 1.4vw, 22px);
  background: #FFFFFF;
  border: 1px solid rgba(10,20,40,.08);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(10,20,40,.06);
  cursor: pointer;
  white-space: nowrap;
  transform: translate3d(100vw, 0, 0);
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    box-shadow .3s var(--ease),
    border-color .3s var(--ease);
}

.section-4__danmu-avatar {
  width: clamp(24px, 2.2vw, 36px);
  height: clamp(24px, 2.2vw, 36px);
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.section-4__danmu-text {
  color: var(--text);
  font-size: clamp(13px, 1vw, 17px);
  font-weight: 500;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (hover: hover) {
  .section-4__danmu:hover {
    border-color: rgba(56,189,248,.35);
    box-shadow: 0 8px 24px rgba(56,189,248,.18);
  }
}

.section-4__danmu[data-lane="0"] {
  top: 12%;
}

.section-4__danmu[data-lane="1"] {
  top: 34%;
}

.section-4__danmu[data-lane="2"] {
  top: 56%;
}

.section-4__danmu[data-lane="3"] {
  top: 78%;
}

.section-4__expanded {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 1.6vw, 28px);
  padding: clamp(40px, 4vw, 64px);
  background: rgba(255,255,255,.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0) scale(.95);
  transition:
    opacity .45s var(--ease),
    transform .45s var(--ease);
  text-align: center;
  z-index: 5;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.section-4__expanded.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.section-4__close {
  position: absolute;
  top: clamp(12px, 1.2vw, 20px);
  right: clamp(12px, 1.2vw, 20px);
  width: clamp(36px, 2.8vw, 44px);
  height: clamp(36px, 2.8vw, 44px);
  border: 0;
  border-radius: 50%;
  font-family: inherit;
  background: rgba(10,20,40,.06);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 400;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .3s var(--ease);
}

@media (hover: hover) {
  .section-4__close:hover {
    background: rgba(10,20,40,.12);
  }
}

.section-4__expanded-avatar {
  width: clamp(80px, 7vw, 120px);
  height: clamp(80px, 7vw, 120px);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  opacity: 0;
  transform: translate3d(0, 20px, 0) scale(.9);
  transition:
    opacity .5s var(--ease) .1s,
    transform .5s var(--ease) .1s;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.section-4__expanded.is-open .section-4__expanded-avatar {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.section-4__expanded-quote {
  max-width: 680px;
  margin: 0;
  color: var(--text);
  font-size: clamp(16px, 1.4vw, 24px);
  font-weight: 500;
  line-height: 1.6;
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition:
    opacity .5s var(--ease) .25s,
    transform .5s var(--ease) .25s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.section-4__expanded.is-open .section-4__expanded-quote {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.section-4__expanded-meta {
  margin: 0;
  color: var(--accent);
  font-size: clamp(12px, .9vw, 16px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .04em;
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition:
    opacity .5s var(--ease) .4s,
    transform .5s var(--ease) .4s;
}

.section-4__expanded.is-open .section-4__expanded-meta {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (max-width: 767px) {
  #section-4.home-section {
    padding: clamp(68px, 14vw, 110px) 0;
  }

  .section-4__inner {
    padding: 0 clamp(18px, 5vw, 28px);
  }

  .section-4__head {
    margin-bottom: clamp(36px, 9vw, 56px);
  }

  .section-4__title {
    font-size: clamp(28px, 8vw, 40px);
  }

  .section-4__monitor {
    max-width: 100%;
  }

  .section-4__danmu {
    gap: clamp(5px, 1.6vw, 7px);
    padding: clamp(4px, 1.4vw, 7px) clamp(8px, 2.4vw, 12px);
  }

  .section-4__danmu-text {
    font-size: clamp(9px, 2.6vw, 11px);
    line-height: 1.15;
  }

  .section-4__danmu-avatar {
    width: clamp(16px, 4.6vw, 20px);
    height: clamp(16px, 4.6vw, 20px);
  }

  .section-4__danmu[data-lane="0"] {
    top: 10%;
  }

  .section-4__danmu[data-lane="1"] {
    top: 38%;
  }

  .section-4__danmu[data-lane="2"] {
    top: 66%;
  }

  .section-4__danmu[data-lane="3"] {
    top: 38%;
  }

  .section-4__expanded {
    justify-content: center;
    gap: clamp(3px, 1.2vw, 6px);
    box-sizing: border-box;
    max-height: 100%;
    padding: clamp(6px, 2vw, 10px) clamp(8px, 3vw, 14px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .section-4__close {
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    font-size: 12px;
  }

  .section-4__expanded-avatar {
    width: clamp(26px, 7vw, 36px);
    height: clamp(26px, 7vw, 36px);
    border-width: 1px;
  }

  .section-4__expanded-quote {
    max-width: 100%;
    font-size: clamp(6.5px, 1.9vw, 8px);
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

  .section-4__expanded-meta {
    font-size: clamp(7px, 2vw, 8.5px);
    line-height: 1.2;
    letter-spacing: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-4__danmu,
  .section-4__expanded,
  .section-4__expanded-avatar,
  .section-4__expanded-quote,
  .section-4__expanded-meta {
    transition: none !important;
  }
}
