@font-face {
  font-family: "Pretendard";
  font-style: normal;
  font-weight: 45 920;
  font-display: swap;
  src: url("/assets/fonts/PretendardVariable.v1.3.9.woff2")
    format("woff2-variations");
}

.pka-account {
  align-items: center;
  display: inline-flex;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  position: relative;
  z-index: 80;
}

.pka-account button,
.pka-account input,
.pka-modal-layer button,
.pka-modal-layer input {
  font: inherit;
}

.pka-account button,
.pka-modal-layer button {
  border: 0;
  cursor: pointer;
}

.pka-account button:focus-visible,
.pka-account a:focus-visible,
.pka-modal-layer button:focus-visible,
.pka-modal-layer input:focus-visible,
.pka-modal-layer a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.pka-login-trigger {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #dbeafe !important;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  white-space: nowrap;
}

.pka-login-trigger svg {
  height: 17px;
  width: 17px;
}

.pka-session-loading {
  align-items: center;
  background: #f2f4f7;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.pka-session-spinner {
  animation: pka-spin 0.8s linear infinite;
  border: 2px solid #d0d5dd;
  border-right-color: #2563eb;
  border-radius: 50%;
  height: 17px;
  width: 17px;
}

@keyframes pka-spin {
  to { transform: rotate(360deg); }
}

.pka-profile-trigger {
  align-items: center;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
  border: 1px solid rgba(37, 99, 235, 0.18) !important;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.16);
  color: #1d4ed8;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 38px;
}

.pka-profile-trigger::after {
  background: #16a34a;
  border: 2px solid #fff;
  border-radius: 50%;
  bottom: -1px;
  content: "";
  height: 10px;
  position: absolute;
  right: -1px;
  width: 10px;
}

.pka-profile-initial {
  align-items: center;
  display: grid;
  font-size: 15px;
  font-weight: 950;
  height: 100%;
  inset: 0;
  justify-items: center;
  line-height: 1;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  text-align: center;
  text-indent: 0;
  white-space: nowrap;
  width: 100%;
  writing-mode: horizontal-tb;
}

@media (prefers-reduced-motion: reduce) {
  .pka-session-spinner { animation: none; }
}

.pka-menu {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #e5eaf2;
  border-radius: 20px;
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.18);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: calc(100% + 11px);
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 150ms ease, transform 150ms ease;
  width: min(276px, calc(100vw - 28px));
}

.pka-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.pka-menu-profile {
  align-items: center;
  background: linear-gradient(145deg, #f8fbff, #eef5ff);
  border-bottom: 1px solid #e8edf5;
  display: grid;
  gap: 12px;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 17px;
}

.pka-menu-avatar {
  align-items: center;
  background: #2563eb;
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 17px;
  font-weight: 950;
  height: 44px;
  justify-content: center;
  line-height: 1;
  text-align: center;
  text-indent: 0;
  width: 44px;
  writing-mode: horizontal-tb;
}

.pka-menu-name {
  color: #172033;
  display: block;
  font-size: 15px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pka-menu-phone {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 3px;
}

.pka-menu-list {
  display: grid;
  padding: 8px;
}

.pka-menu-item {
  align-items: center;
  background: transparent;
  border-radius: 13px;
  color: #344054;
  display: grid;
  font-size: 14px;
  font-weight: 820;
  gap: 11px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  min-height: 44px;
  padding: 0 11px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.pka-menu-item:hover {
  background: #f5f8fd;
  color: #1d4ed8;
}

.pka-menu-item svg {
  height: 19px;
  width: 19px;
}

.pka-wallet-item {
  background: linear-gradient(135deg, #f7faff, #eef5ff);
  color: #1d4ed8;
}

.pka-wallet-item:hover {
  background: #e9f2ff;
}

.pka-coupon-item {
  color: #6941c6;
}

.pka-coupon-item:hover {
  background: #f4f0ff;
  color: #5925dc;
}

.pka-menu-amount {
  color: #1769ff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  white-space: nowrap;
}

.pka-menu-badge {
  background: #f2f4f7;
  border-radius: 999px;
  color: #667085;
  font-size: 10px;
  font-weight: 850;
  padding: 4px 7px;
}

.pka-menu-divider {
  background: #eef1f5;
  height: 1px;
  margin: 5px 9px;
}

.pka-menu-item.pka-logout {
  color: #b42318;
}

.pka-menu-item.pka-logout:hover {
  background: #fff4f3;
  color: #b42318;
}

.pka-modal-layer {
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(9px);
  display: flex;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  height: var(--pka-visual-height, 100dvh);
  inset: auto 0;
  justify-content: center;
  opacity: 0;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  pointer-events: none;
  position: fixed;
  top: var(--pka-visual-offset-top, 0px);
  transition: opacity 180ms ease;
  z-index: 10000;
}

.pka-modal-layer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pka-modal {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  color: #172033;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.015em;
  max-height: min(720px, calc(var(--pka-visual-height, 100dvh) - 32px));
  max-width: 430px;
  opacity: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 25px;
  position: relative;
  transform: translateY(14px) scale(0.97);
  transition: opacity 180ms ease, transform 180ms ease;
  width: 100%;
}

.pka-modal-layer.is-open .pka-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pka-modal-close {
  align-items: center;
  background: #f2f4f7;
  border-radius: 50%;
  color: #475467;
  display: flex;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 36px;
}

.pka-modal-close svg {
  height: 19px;
  width: 19px;
}

.pka-modal-brand {
  display: block;
  height: 31px;
  margin-bottom: 34px;
  object-fit: contain;
  width: auto;
}

.pka-heading {
  color: #101828;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.22;
  margin: 0 44px 28px 0;
}

.pka-form {
  display: grid;
  gap: 14px;
}

.pka-label {
  color: #344054;
  display: grid;
  font-size: 13px;
  font-weight: 820;
  gap: 8px;
}

.pka-input-wrap {
  position: relative;
}

.pka-input {
  background: #fff;
  border: 1px solid #d9e2ef;
  border-radius: 15px;
  color: #101828;
  font-size: 16px;
  font-weight: 600;
  height: 54px;
  outline: none;
  padding: 0 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

.pka-input:focus {
  border-color: #1769ff;
  box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.1);
}

.pka-input[readonly] {
  background: #f8fafc;
  color: #475467;
  padding-right: 68px;
}

.pka-change-phone {
  background: transparent;
  color: #1769ff;
  font-size: 12px;
  font-weight: 850;
  height: 34px;
  padding: 0 10px;
  position: absolute;
  right: 7px;
  top: 10px;
}

.pka-notice {
  background: #f8fafc;
  border: 1px solid #e6ebf2;
  border-radius: 13px;
  color: #667085;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
  padding: 12px 13px;
}

.pka-verified-phone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #cfe0ff;
  border-radius: 16px;
  background: #f1f6ff;
  color: #23406f;
}

.pka-verified-phone > span:last-child {
  display: grid;
  gap: 2px;
}

.pka-verified-phone strong {
  font-size: 14px;
  line-height: 1.35;
  color: #14294d;
}

.pka-verified-phone small {
  font-size: 12px;
  font-weight: 700;
  color: #6f82a3;
}

.pka-verified-check {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  background: #1769ff;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.pka-error {
  background: #fff4f3;
  border: 1px solid #fecdca;
  border-radius: 12px;
  color: #b42318;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
  padding: 10px 12px;
}

.pka-code-meta {
  align-items: center;
  color: #667085;
  display: flex;
  font-size: 12px;
  font-weight: 650;
  justify-content: space-between;
}

.pka-timer {
  color: #1769ff;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.pka-primary {
  align-items: center;
  background: #1769ff;
  border-radius: 15px;
  box-shadow: 0 10px 24px rgba(23, 105, 255, 0.2);
  color: #fff;
  display: flex;
  font-size: 14px;
  font-weight: 900;
  height: 54px;
  justify-content: center;
  transition: background 150ms ease, transform 150ms ease;
  width: 100%;
}

.pka-primary:hover {
  background: #0f55dc;
  transform: translateY(-1px);
}

.pka-primary:disabled,
.pka-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.pka-secondary {
  background: transparent;
  color: #475467;
  font-size: 13px;
  font-weight: 820;
  min-height: 40px;
}

.pka-privacy {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 620;
  line-height: 1.55;
  margin: 18px 4px 0;
  text-align: center;
}

.pka-privacy a {
  color: #667085;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pka-toast {
  background: #172033;
  border-radius: 999px;
  bottom: 22px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.24);
  color: #fff;
  font-size: 13px;
  font-weight: 760;
  left: 50%;
  max-width: calc(100vw - 32px);
  opacity: 0;
  padding: 12px 17px;
  pointer-events: none;
  position: fixed;
  text-align: center;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 10020;
}

.pka-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pka-hidden {
  display: none !important;
}

body.pka-modal-open {
  overflow: hidden;
}

body.pka-modal-open #ch-plugin {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

@media (max-width: 520px) {
  .pka-login-trigger {
    min-height: 34px;
    padding: 0 11px;
  }

  .pka-profile-trigger {
    height: 36px;
    width: 36px;
  }

  .pka-modal-layer {
    align-items: center;
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .pka-modal-layer.pka-keyboard-open {
    align-items: flex-start;
    overflow-y: auto;
  }

  .pka-modal-layer.pka-keyboard-open .pka-modal {
    margin: 0 auto;
  }

  .pka-modal {
    border-radius: 24px;
    max-height: calc(var(--pka-visual-height, 100dvh) - 24px);
    max-width: 430px;
    padding: 24px 20px;
    transform: translateY(18px) scale(0.98);
  }

  .pka-modal-layer.is-open .pka-modal {
    transform: translateY(0) scale(1);
  }

  .pka-modal-brand {
    margin-bottom: 25px;
  }

  .pka-heading {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pka-menu,
  .pka-modal-layer,
  .pka-modal,
  .pka-primary,
  .pka-toast {
    transition: none !important;
  }
}
