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

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

.ee {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: clamp(280px, 86vw, 384px);
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.ee__tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid #ddd6ca;
}

.ee__tab {
  box-sizing: border-box;
  height: 36px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #5b5566;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  font-family: inherit;
}

.ee__tab.is-on {
  color: #15131a;
}

.ee__tab:focus-visible {
  outline: 2px solid #477690;
  outline-offset: -2px;
}

.ee__line {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 50%;
  height: 2px;
  border-radius: 999px;
  background: #477690;
  transform: translateX(calc(var(--n, 0) * 100%));
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ee__panels {
  display: grid;
}

.ee__panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ee__panel[hidden] {
  display: none;
}

.ee__label {
  margin: 0;
  color: #5b5566;
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  font-family: inherit;
}

.ee__mail {
  box-sizing: border-box;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: #15131a;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  font-family: inherit;
}

.ee__mail:focus-visible {
  outline: 2px solid #15131a;
  outline-offset: 2px;
}

.ee__mailIc {
  display: grid;
  place-items: center;
}

.ee__mailIc svg {
  display: block;
}

.ee__field {
  display: flex;
  gap: 8px;
}

.ee__code {
  flex: 1 1 auto;
  box-sizing: border-box;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #ddd6ca;
  border-radius: 12px;
  background: #fdf8f0;
  color: #15131a;
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  font-family: inherit;
}

.ee__code:focus-visible {
  outline: 2px solid #477690;
  outline-offset: 1px;
}

.ee__copy {
  flex: 0 0 auto;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #15131a;
  color: #ffffff;
  cursor: pointer;
}

.ee__copy svg {
  display: block;
}

.ee__copy:focus-visible {
  outline: 2px solid #15131a;
  outline-offset: 2px;
}

.is-demo .ee__panel {
  grid-area: 1/1;
}

.is-demo .ee__panel[hidden] {
  display: flex;
}

.is-demo .ee__line {
  animation-name: eeSlide;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.is-demo .ee__panel, .is-demo .ee__tab {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.is-demo .ee__panel--mail {
  animation-name: eeShowA;
}

.is-demo .ee__panel--embed {
  animation-name: eeShowB;
}

.is-demo .ee__tab:nth-child(1) {
  animation-name: eeOnA;
}

.is-demo .ee__tab:nth-child(2) {
  animation-name: eeOnB;
}

.is-demo .ee__mail, .is-demo .ee__field {
  animation-name: eePop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.is-demo .ee__field {
  animation-delay: 1s;
}

@keyframes eeSlide {
  0%, 4% {
    transform: translateX(0);
  }
  46%, 50% {
    transform: translateX(100%);
  }
  92%, 100% {
    transform: translateX(0);
  }
}
@keyframes eeShowA {
  0%, 49.9% {
    visibility: visible;
  }
  50%, 95.7% {
    visibility: hidden;
  }
  95.8%, 100% {
    visibility: visible;
  }
}
@keyframes eeShowB {
  0%, 49.9% {
    visibility: hidden;
  }
  50%, 95.7% {
    visibility: visible;
  }
  95.8%, 100% {
    visibility: hidden;
  }
}
@keyframes eeOnA {
  0%, 49.9% {
    color: #15131a;
  }
  50%, 95.7% {
    color: #5b5566;
  }
  95.8%, 100% {
    color: #15131a;
  }
}
@keyframes eeOnB {
  0%, 49.9% {
    color: #5b5566;
  }
  50%, 95.7% {
    color: #15131a;
  }
  95.8%, 100% {
    color: #5b5566;
  }
}
@keyframes eePop {
  0% {
    transform: translateY(10px) scale(0.96);
  }
  14%, 50% {
    transform: translateY(0) scale(1);
  }
  50.1%, 100% {
    transform: translateY(0) scale(1);
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .ee {
    gap: 8px;
    padding: 12px;
  }
  .ee__tab {
    height: 32px;
    font-size: 12px;
  }
  .ee__mail {
    height: 36px;
    padding: 0 12px;
    font-size: 11px;
  }
  .ee__code {
    height: 36px;
    padding: 0 8px;
    font-size: 10px;
  }
  .ee__copy {
    width: 36px;
    height: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-demo .ee__line, .is-demo .ee__panel, .is-demo .ee__tab,
  .is-demo .ee__mail, .is-demo .ee__field {
    animation: none !important;
  }
  .ee__line {
    transition: none !important;
  }
  .is-demo .ee__panel[hidden] {
    display: none;
  }
}
