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

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

.tl {
  display: grid;
  place-items: center;
  width: 100%;
}

.tl__panel {
  box-sizing: border-box;
  width: clamp(190px, 60vw, 230px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 247, 230, 0.06);
  border: 1px solid rgba(255, 247, 230, 0.18);
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.tl__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  height: 16px;
}

.tl__led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: rgba(255, 210, 63, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 210, 63, 0.35);
}

.tl__name {
  font-weight: 700;
  font-size: clamp(10px, 2.6vw, 12px);
  line-height: 1;
  letter-spacing: 0.18em;
  color: rgba(255, 247, 230, 0.78);
}

.tl__assembly {
  position: relative;
  width: 130px;
  height: 92px;
}

.tl__bracket {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 130px;
  height: 22px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, rgba(23, 20, 26, 0.3)), #ffffff;
  box-shadow: 0 2px 0 rgba(23, 20, 26, 0.8), inset 0 1px 0 rgba(255, 247, 230, 0.8);
}

.tl__slot {
  position: absolute;
  left: 50%;
  top: 72px;
  width: 72px;
  height: 6px;
  margin-left: -36px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.6);
  box-shadow: inset 0 2px 3px rgba(23, 20, 26, 0.9), 0 1px 0 rgba(255, 247, 230, 0.16);
}

.tl__dome {
  position: absolute;
  left: calc(50% - 13px);
  bottom: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(155deg, rgba(255, 247, 230, 0.95), rgba(255, 247, 230, 0.35) 55%, rgba(23, 20, 26, 0.65));
  box-shadow: 0 1px 2px rgba(23, 20, 26, 0.9);
}

.tl__hit {
  position: absolute;
  inset: 0;
  z-index: 5;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tl__hit:focus-visible {
  outline: 2px solid #ffd23f;
  outline-offset: 2px;
  border-radius: 12px;
}

.tl__armWrap {
  position: absolute;
  left: calc(50% - 5px);
  bottom: 15px;
  width: 10px;
  height: 80px;
  border-radius: 999px;
  transform-origin: 50% 100%;
  transform: rotate(-24deg);
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
  background: linear-gradient(90deg, rgba(23, 20, 26, 0.55), rgba(255, 247, 230, 0.82) 42%, rgba(255, 247, 230, 0.95) 50%, rgba(255, 247, 230, 0.7) 62%, rgba(23, 20, 26, 0.5));
  box-shadow: 0 4px 8px rgba(23, 20, 26, 0.55);
}

.tl__grip {
  position: absolute;
  top: -13px;
  left: calc(50% - 15px);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(255, 247, 230, 0.96), rgba(255, 247, 230, 0.45) 48%, rgba(23, 20, 26, 0.55));
  box-shadow: 0 6px 10px rgba(23, 20, 26, 0.6), inset 0 1px 1px rgba(255, 247, 230, 0.9);
}

.tl__marks {
  display: flex;
  justify-content: space-between;
  width: 118px;
  margin: 0;
}

.tl__mark {
  font-weight: 800;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1;
  letter-spacing: 0.14em;
}

.tl__mark--off {
  color: rgba(255, 247, 230, 0.78);
}

.tl__mark--on {
  color: rgba(255, 247, 230, 0.72);
}

.tl__state {
  position: relative;
  margin: 0;
  width: 60px;
  height: 16px;
}

.tl__wordOff, .tl__wordOn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(11px, 2.8vw, 13px);
  line-height: 1;
}

.tl__wordOff {
  color: rgba(255, 247, 230, 0.85);
}

.tl__wordOn {
  color: #ffd23f;
  display: none;
}

.tl.is-on .tl__armWrap {
  transform: rotate(24deg);
}

.tl.is-on .tl__led {
  background: #ffd23f;
  box-shadow: 0 0 10px rgba(255, 210, 63, 0.85), 0 0 0 3px rgba(255, 210, 63, 0.25);
}

.tl.is-on .tl__mark--on {
  color: #ffd23f;
}

.tl.is-on .tl__mark--off {
  color: rgba(255, 247, 230, 0.72);
}

.tl.is-on .tl__wordOn {
  display: flex;
}

.tl.is-on .tl__wordOff {
  display: none;
}

.tl.is-demo .tl__armWrap {
  animation-name: tlSwing;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes tlSwing {
  0% {
    transform: rotate(-24deg);
  }
  8% {
    transform: rotate(-24deg);
  }
  38% {
    transform: rotate(28deg);
  }
  44% {
    transform: rotate(23deg);
  }
  48% {
    transform: rotate(24deg);
  }
  68% {
    transform: rotate(24deg);
  }
  88% {
    transform: rotate(-28deg);
  }
  94% {
    transform: rotate(-23deg);
  }
  97% {
    transform: rotate(-24deg);
  }
  100% {
    transform: rotate(-24deg);
  }
}
.tl.is-demo .tl__led {
  animation-name: tlLed;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes tlLed {
  0% {
    background: rgba(255, 210, 63, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 210, 63, 0.35);
  }
  46% {
    background: #ffd23f;
    box-shadow: 0 0 10px rgba(255, 210, 63, 0.85), 0 0 0 3px rgba(255, 210, 63, 0.25);
  }
  70% {
    background: rgba(255, 210, 63, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 210, 63, 0.35);
  }
  100% {
    background: rgba(255, 210, 63, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 210, 63, 0.35);
  }
}
.tl.is-demo .tl__mark--on {
  animation-name: tlMarkOn;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes tlMarkOn {
  0% {
    color: rgba(255, 247, 230, 0.72);
  }
  46% {
    color: #ffd23f;
  }
  70% {
    color: rgba(255, 247, 230, 0.72);
  }
  100% {
    color: rgba(255, 247, 230, 0.72);
  }
}
.tl.is-demo .tl__mark--off {
  animation-name: tlMarkOff;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes tlMarkOff {
  0% {
    color: rgba(255, 247, 230, 0.78);
  }
  46% {
    color: rgba(255, 247, 230, 0.72);
  }
  70% {
    color: rgba(255, 247, 230, 0.78);
  }
  100% {
    color: rgba(255, 247, 230, 0.78);
  }
}
.tl.is-demo .tl__wordOn {
  display: flex;
  opacity: 0;
}

.tl.is-demo .tl__wordOff {
  opacity: 1;
}

.tl.is-demo .tl__wordOn {
  animation-name: tlWordOn;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes tlWordOn {
  0% {
    opacity: 0;
  }
  46% {
    opacity: 1;
  }
  70% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.tl.is-demo .tl__wordOff {
  animation-name: tlWordOff;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes tlWordOff {
  0% {
    opacity: 1;
  }
  46% {
    opacity: 0;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@media (max-width: 340px) {
  .tl__panel {
    gap: 4px;
    padding: 8px;
  }
  .tl__assembly {
    width: 110px;
    height: 66px;
  }
  .tl__bracket {
    width: 110px;
    height: 18px;
  }
  .tl__slot {
    top: 52px;
    left: calc(50% - 30px);
    width: 60px;
  }
  .tl__dome {
    width: 20px;
    height: 20px;
    left: calc(50% - 10px);
    bottom: 2px;
  }
  .tl__armWrap {
    height: 56px;
    bottom: 11px;
  }
  .tl__grip {
    width: 24px;
    height: 24px;
    left: calc(50% - 12px);
    top: -10px;
  }
  .tl__marks {
    width: 100px;
  }
  .tl__state {
    height: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tl.is-demo .tl__armWrap {
    animation: none !important;
    transform: rotate(-24deg) !important;
  }
  .tl.is-demo .tl__led {
    animation: none !important;
  }
  .tl.is-demo .tl__mark--on {
    animation: none !important;
  }
  .tl.is-demo .tl__mark--off {
    animation: none !important;
  }
  .tl.is-demo .tl__wordOn {
    animation: none !important;
    opacity: 0 !important;
  }
  .tl.is-demo .tl__wordOff {
    animation: none !important;
    opacity: 1 !important;
  }
}
