html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.sd {
  width: min(100%, 300px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sd__tabs {
  display: flex;
  gap: 4px;
  background: rgba(23, 20, 26, 0.06);
  padding: 4px;
  border-radius: 999px;
}

.sd__tab {
  flex: 1 1 0;
  border: none;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  padding: 8px 8px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(23, 20, 26, 0.68);
}

.sd__tab.is-active {
  background: #0a4fe8;
  color: #fff7e6;
}

.sd__tab:focus-visible {
  outline: 2px solid #0a4fe8;
  outline-offset: 2px;
}

.sd__wrap {
  position: relative;
  min-width: 0;
  height: 150px;
  perspective: 900px;
}

.sd__panel {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  background: #fff7e6;
  box-shadow: 0 6px 18px rgba(23, 20, 26, 0.12);
  transform-origin: center 70%;
  transform: translateY(calc(var(--d) * 10px)) translateZ(calc(var(--d) * -40px)) scale(calc(1 - var(--d) * 0.08));
  opacity: calc(1 - var(--d) * 0.22);
  filter: brightness(calc(1 - var(--d) * 0.12));
  z-index: calc(3 - var(--d));
  transition: transform 300ms ease-out, opacity 300ms ease-out, filter 300ms ease-out;
}

.sd__panel[aria-hidden=true] {
  pointer-events: none;
}

.sd__num {
  font-size: 30px;
  font-weight: 800;
  color: #0a4fe8;
}

.sd__line {
  margin: 0;
  font-size: 12px;
  color: rgba(23, 20, 26, 0.72);
}

.sd__meta {
  margin: 0;
  font-size: 11px;
  color: rgba(23, 20, 26, 0.68);
  text-align: center;
}

.sd__meta b {
  color: #17141a;
  font-weight: 700;
}

@media (max-width: 340px) {
  .sd {
    width: 100%;
    gap: 8px;
  }
  .sd__tab {
    padding: 4px 8px;
  }
  .sd__wrap {
    height: 96px;
  }
  .sd__num {
    font-size: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sd__panel {
    transition: none;
  }
}
