* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  color: #ffffff;
  font-family: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

/* ============================================================ */
/* 스크롤 무대: 슬라이더 위치에 따라 transform: translateY 변함 */
/* ============================================================ */
#scroll-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#content {
  position: absolute;
  left: 0;
  right: 0;
  /* 처음엔 화면 아래에 숨겨져 있음 */
  top: 100vh;
  /* JS가 transform: translateY(...) 으로 위로 올림 */
  transform: translateY(0);
  transition: transform 0.08s linear;
  padding: 80px 60px 200px;
}

/* ============================================================ */
/* 텍스트 패널 그리드: 사진처럼 흰 사각형 안에 검정 세로쓰기 */
/* ============================================================ */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 80px));
  gap: 20px 30px;
  align-items: end; /* 사진처럼 아래 정렬, 위에 들쭉날쭉 */
  max-width: 1100px;
  margin: 0 auto;
}

.panel {
  background: #ffffff;
  width: 100%;
  height: var(--h, 300px);
  padding: 16px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

/* 세로쓰기 */
.vtext {
  writing-mode: vertical-rl;
  -ms-writing-mode: tb-rl;
  text-orientation: upright;
  color: #000000;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ============================================================ */
/* 컨트롤 패널: 슬라이더 연결 + 수동 테스트 */
/* ============================================================ */
#control-panel {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 14px 18px;
  font-family: "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: #ddd;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

#connect-btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 6px 14px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

#connect-btn:hover {
  background: #ccc;
}

#connect-btn.connected {
  background: #4ade80;
}

.value-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.value-display .label {
  color: #888;
}

#value-text {
  color: #fff;
  min-width: 50px;
  font-weight: 500;
}

#manual-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #333;
  border-radius: 2px;
  outline: none;
}

#manual-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}

.hint {
  margin-top: 6px;
  font-size: 10px;
  color: #666;
}
