.voting-schedule-popup {
  position: fixed;
  z-index: 5000;
  inset: 0;
  width: min(720px, calc(100vw - 40px), calc(100svh - 220px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: visible;
  color: #092e54;
  background: transparent;
  border: 0;
}

.voting-schedule-popup::backdrop {
  background: rgba(2, 18, 45, 0.78);
  backdrop-filter: blur(6px);
}

.voting-schedule-popup__panel {
  position: relative;
  padding: 10px 10px 12px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 12, 38, 0.5);
}

.voting-schedule-popup__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: #0f2bbb;
  border-radius: 17px;
  -webkit-user-drag: none;
  user-select: none;
}

.voting-schedule-popup__close {
  display: grid;
  position: absolute;
  z-index: 2;
  top: -16px;
  right: -16px;
  width: 50px;
  height: 50px;
  padding: 0 0 4px;
  place-items: center;
  color: #fff;
  background: #082f62;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0, 20, 58, 0.34);
  font-family: Arial, sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.voting-schedule-popup__message {
  position: relative;
  margin: 0;
  padding: 15px 48px 13px;
  overflow: hidden;
  color: #102b66;
  font-family: "Mulmaru", Pretendard, "Noto Sans KR", sans-serif;
  font-size: clamp(1.03rem, 2.25vw, 1.42rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1.35;
  text-align: center;
  word-break: keep-all;
}

.voting-schedule-popup__message::before,
.voting-schedule-popup__message::after {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 3px;
  content: "";
  background: #f5bf4f;
  border-radius: 99px;
  transform: translateY(-50%);
}

.voting-schedule-popup__message::before { left: 4px; }
.voting-schedule-popup__message::after { right: 4px; }

.voting-schedule-popup__message-line {
  display: block;
}

.voting-schedule-popup__message-line--memory {
  margin-bottom: 8px;
}

.voting-schedule-popup__message-line--vote {
  color: #2029a3;
  font-size: 1.22em;
  line-height: 1.3;
}

.voting-schedule-popup__message strong {
  display: inline-block;
  margin: 0 0.08em 3px;
  padding: 0.08em 0.3em 0.16em;
  color: #fff;
  background: #2029a3;
  border-radius: 7px;
  letter-spacing: 0.04em;
  line-height: 1.08;
  vertical-align: 0.02em;
  box-shadow: 3px 3px 0 #f5bf4f;
  transform: rotate(-1.5deg);
}

.voting-schedule-popup__number,
.voting-schedule-popup__name {
  font: inherit;
}

.voting-schedule-popup__number {
  color: #e3a500;
}

.voting-schedule-popup__name {
  color: #e3a500;
}

.voting-schedule-popup__actions {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 8px;
}

.voting-schedule-popup__button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 2px solid #2029a3;
  border-radius: 13px;
  font-family: "Mulmaru", Pretendard, "Noto Sans KR", sans-serif;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.voting-schedule-popup__button--close {
  color: #2029a3;
  background: #fff;
}

.voting-schedule-popup__button--today {
  color: #fff;
  background: #2029a3;
}

.voting-schedule-popup__close:hover {
  background: #1671b8;
}

.voting-schedule-popup__button:hover {
  color: #fff;
  background: #1671b8;
  border-color: #1671b8;
}

.voting-schedule-popup__close:active,
.voting-schedule-popup__button:active {
  transform: scale(0.97);
}

.voting-schedule-popup__close:focus-visible,
.voting-schedule-popup__button:focus-visible {
  outline: 4px solid #f5bf4f;
  outline-offset: 3px;
}

body.has-voting-schedule-popup {
  overflow: hidden;
}

@media (max-width: 720px) {
  .voting-schedule-popup {
    width: min(calc(100vw - 24px), calc(100svh - 190px));
  }

  .voting-schedule-popup__panel {
    padding: 7px 7px 9px;
    border-radius: 18px;
  }

  .voting-schedule-popup__image {
    border-radius: 13px;
  }

  .voting-schedule-popup__close {
    top: -12px;
    right: -8px;
    width: 44px;
    height: 44px;
    border-width: 3px;
    font-size: 28px;
  }

  .voting-schedule-popup__message {
    padding: 12px 6px 11px;
    font-size: clamp(0.88rem, 4vw, 1.02rem);
  }

  .voting-schedule-popup__message-line--memory {
    margin-bottom: 6px;
  }

  .voting-schedule-popup__message-line--vote {
    font-size: 1.18em;
  }

  .voting-schedule-popup__message::before,
  .voting-schedule-popup__message::after {
    display: none;
  }

  .voting-schedule-popup__actions {
    gap: 6px;
  }

  .voting-schedule-popup__button {
    min-height: 48px;
    padding-inline: 8px;
    border-radius: 11px;
    font-size: clamp(0.78rem, 3.5vw, 0.94rem);
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .voting-schedule-popup {
    width: min(380px, calc(100vw - 32px), calc(100svh - 185px));
  }

  .voting-schedule-popup__message {
    padding-block: 8px;
    font-size: 0.84rem;
  }

  .voting-schedule-popup__button {
    min-height: 40px;
    padding-block: 7px;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .voting-schedule-popup__close,
  .voting-schedule-popup__button {
    transition: none;
  }
}
