.prana-scratch-overlay,
.prana-scratch-overlay * {
  box-sizing: border-box;
}

.prana-scratch-overlay[hidden] {
  display: none !important;
}

.prana-scratch-overlay {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(29, 37, 47, 0.78);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d252f;
  opacity: 0;
  transition: opacity 180ms ease;
}

.prana-scratch-overlay.is-visible {
  opacity: 1;
}

.prana-scratch-dialog {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 480px);
  width: min(760px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
  transform: translateY(14px) scale(0.985);
  transition: transform 220ms ease;
}

.prana-scratch-overlay.is-visible .prana-scratch-dialog {
  transform: translateY(0) scale(1);
}

.prana-scratch-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px 24px;
  background: #fcf2f8;
}

.prana-scratch-crystal {
  width: 150px;
  height: auto;
  filter: drop-shadow(0 14px 18px rgba(165, 42, 99, 0.12));
}

.prana-scratch-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.prana-scratch-brand strong {
  font-family: Poppins, Inter, sans-serif;
  font-size: 20px;
  line-height: 1.3;
}

.prana-scratch-brand span {
  font-size: 14px;
  color: #5f6672;
}

.prana-scratch-main {
  position: relative;
  width: 100%;
  min-width: 0;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 56px 32px 28px;
  background: #fff;
  scrollbar-width: thin;
}

.prana-scratch-close {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #4b5260;
  cursor: pointer;
}

.prana-scratch-close:hover,
.prana-scratch-close:focus-visible {
  background: #e7e9ed;
}

.prana-scratch-stage {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.prana-scratch-stage.is-active {
  display: flex;
}

.prana-scratch-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: center;
}

.prana-scratch-head h2,
.prana-scratch-done h2 {
  margin: 0;
  font-family: Poppins, Inter, sans-serif;
  font-size: 27px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1d252f;
}

.prana-scratch-head p,
.prana-scratch-done p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #5f6672;
}

.prana-scratch-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fcf2f8;
  color: #a52a63;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
}

.prana-scratch-ticket {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1.5px dashed #4cb3de;
  border-radius: 22px;
  background: #eef8fe;
}

.prana-scratch-ticket-label {
  color: #1b74a6;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.prana-scratch-area {
  position: relative;
  height: 150px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(29, 37, 47, 0.08);
}

.prana-scratch-prize {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  text-align: center;
}

.prana-scratch-prize strong {
  font-family: Poppins, Inter, sans-serif;
  font-size: 50px;
  line-height: 1;
  font-weight: 700;
  color: #1b74a6;
}

.prana-scratch-prize strong.is-long {
  max-width: 300px;
  font-size: 32px;
  line-height: 1.12;
}

.prana-scratch-prize span {
  color: #5f6672;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}

.prana-scratch-canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  cursor: none;
  touch-action: none;
  transition: opacity 600ms ease;
}

.prana-scratch-canvas.is-revealed {
  opacity: 0;
  pointer-events: none;
}

.prana-scratch-coin {
  position: absolute;
  z-index: 3;
  right: -14px;
  bottom: -14px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 3px solid #c9a24a;
  border-radius: 50%;
  background: #e8c47a;
  box-shadow: 0 6px 14px rgba(122, 90, 18, 0.35), inset 0 0 0 3px #f3dca6;
  pointer-events: none;
  transition: opacity 400ms ease;
}

.prana-scratch-coin.is-hidden {
  opacity: 0;
}

.prana-scratch-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.prana-scratch-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5f6672;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.prana-scratch-dismiss {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #5f6672;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.prana-scratch-mini-ticket {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1.5px dashed #4cb3de;
  border-radius: 18px;
  background: #eef8fe;
}

.prana-scratch-mini-ticket strong {
  font-family: Poppins, Inter, sans-serif;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 700;
  color: #1b74a6;
  text-align: center;
}

.prana-scratch-mini-ticket strong.is-long {
  max-width: 180px;
  font-size: 22px;
}

.prana-scratch-mini-ticket span {
  color: #4b5260;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  text-align: left;
}

.prana-scratch-form,
.prana-scratch-field {
  display: flex;
  flex-direction: column;
}

.prana-scratch-form {
  gap: 14px;
}

.prana-scratch-field {
  gap: 6px;
}

.prana-scratch-field label {
  color: #1d252f;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}

.prana-scratch-field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1.5px solid #8a919d;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #1d252f;
  font: inherit;
  font-size: 16px;
}

.prana-scratch-field input:focus {
  border-color: #1b74a6;
  box-shadow: 0 0 0 3px rgba(27, 116, 166, 0.16);
}

.prana-scratch-field input[aria-invalid="true"] {
  border-color: #b42318;
}

.prana-scratch-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  color: #5f6672;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
}

.prana-scratch-consent input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: #a52a63;
}

.prana-scratch-consent a {
  color: #1b74a6;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prana-scratch-error,
.prana-scratch-submit-error {
  min-height: 0;
  color: #b42318;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
}

.prana-scratch-error:empty,
.prana-scratch-submit-error:empty {
  display: none;
}

.prana-scratch-submit,
.prana-scratch-return {
  width: 100%;
  min-height: 56px;
  padding: 12px 18px;
  border: 0;
  border-radius: 16px;
  background: #f6b0d4;
  color: #1d252f;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.prana-scratch-submit:hover,
.prana-scratch-return:hover,
.prana-scratch-submit:focus-visible,
.prana-scratch-return:focus-visible {
  background: #ef99c5;
}

.prana-scratch-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.prana-scratch-done {
  align-items: center;
  padding: 14px 0 0;
  text-align: center;
}

.prana-scratch-mail-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(246, 176, 212, 0.34);
}

.prana-scratch-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

body.prana-scratch-open {
  overflow: hidden !important;
}

@media (max-width: 767px), (pointer: coarse) {
  .prana-scratch-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .prana-scratch-dialog {
    display: block;
    width: 100%;
    max-width: 480px;
    max-height: 92dvh;
    border-radius: 26px 26px 0 0;
    transform: translateY(24px);
  }

  .prana-scratch-side {
    display: none;
  }

  .prana-scratch-main {
    max-height: 92dvh;
    padding: 56px 20px max(20px, env(safe-area-inset-bottom));
  }

  .prana-scratch-stage {
    gap: 16px;
  }

  .prana-scratch-head {
    padding: 0 4px;
  }

  .prana-scratch-head h2,
  .prana-scratch-done h2 {
    font-size: clamp(22px, 6.2vw, 25px);
  }

  .prana-scratch-ticket {
    padding: 14px;
    border-radius: 20px;
  }

  .prana-scratch-area {
    height: clamp(132px, 34vw, 148px);
  }

  .prana-scratch-prize strong {
    font-size: clamp(39px, 11vw, 48px);
  }

  .prana-scratch-prize strong.is-long {
    font-size: clamp(26px, 7.4vw, 32px);
  }

  .prana-scratch-coin {
    right: -10px;
    bottom: -10px;
    width: 48px;
    height: 48px;
  }
}

@media (max-height: 680px) and (max-width: 767px) {
  .prana-scratch-main {
    padding-top: 50px;
  }

  .prana-scratch-head {
    gap: 7px;
  }

  .prana-scratch-area {
    height: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .prana-scratch-overlay,
  .prana-scratch-dialog,
  .prana-scratch-canvas,
  .prana-scratch-coin {
    transition: none !important;
  }
}
