.tbs-lgp-overlay[hidden] {
  display: none !important;
}

.tbs-lgp-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 8, 18, 0.72);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

body.tbs-lgp-locked {
  overflow: hidden !important;
}

.tbs-lgp-modal,
.tbs-lgp-modal * {
  box-sizing: border-box;
}

.tbs-lgp-modal {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  max-height: min(92vh, 860px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 18px;
  padding: 32px 30px 30px;
  color: #ffffff;
  text-align: center;
  background:
    radial-gradient(circle at 50% 4%, rgba(57, 211, 73, 0.22), transparent 23%),
    linear-gradient(145deg, #07172c 0%, #09203b 51%, #06172c 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: inherit;
}

.tbs-lgp-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: transparent;
  font-size: 38px;
  line-height: 30px;
  cursor: pointer;
  transition: transform .16s ease, opacity .16s ease, background .16s ease;
}

.tbs-lgp-close:hover,
.tbs-lgp-close:focus-visible {
  transform: scale(1.04);
  opacity: .92;
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.tbs-lgp-ticket-wrap {
  position: relative;
  width: 132px;
  height: 84px;
  margin: 0 auto 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tbs-lgp-ticket {
  width: 96px;
  height: auto;
  display: block;
  transform: rotate(-7deg);
  filter: drop-shadow(0 10px 18px rgba(54, 220, 72, .28));
}

.tbs-lgp-spark {
  position: absolute;
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  border: 2px solid #36db46;
  opacity: .86;
  transform: rotate(25deg);
}

.tbs-lgp-spark-1 { left: 10px; top: 30px; }
.tbs-lgp-spark-2 { left: 30px; top: 12px; width: 5px; height: 5px; }
.tbs-lgp-spark-3 { right: 20px; top: 18px; width: 5px; height: 5px; }
.tbs-lgp-spark-4 { right: 5px; top: 39px; width: 4px; height: 4px; }

.tbs-lgp-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}

.tbs-lgp-subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 13px 0 22px;
  color: #36db46;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 800;
}

.tbs-lgp-subtitle span {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #36db46);
}

.tbs-lgp-subtitle span:last-child {
  background: linear-gradient(90deg, #36db46, transparent);
}

.tbs-lgp-prizes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 0 0 24px;
}

.tbs-lgp-prize-card {
  min-height: 94px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  padding: 18px 16px;
  border: 1px solid #2fd543;
  border-radius: 9px;
  background: rgba(4, 18, 36, 0.54);
  box-shadow: inset 0 0 0 1px rgba(47, 213, 67, 0.08);
}

.tbs-lgp-prize-icon {
  grid-row: 1 / span 2;
  font-size: 24px;
  line-height: 1;
}

.tbs-lgp-prize-card:nth-child(2) .tbs-lgp-prize-icon {
  filter: grayscale(1) brightness(1.4);
}

.tbs-lgp-prize-label {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 650;
}

.tbs-lgp-prize-card strong {
  display: block;
  margin-top: 7px;
  color: #36db46;
  font-size: 23px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.tbs-lgp-copy {
  max-width: 475px;
  margin: 0 auto 22px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 16.5px;
  line-height: 1.6;
  font-weight: 500;
}

.tbs-lgp-actions {
  display: grid;
  gap: 10px;
  margin: 0 0 26px;
}

.tbs-lgp-btn {
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 800;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, border-color .15s ease, background .15s ease;
  font-family: inherit;
}

.tbs-lgp-btn:hover,
.tbs-lgp-btn:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
  outline: none;
  text-decoration: none !important;
}

.tbs-lgp-btn-primary {
  color: #ffffff !important;
  border-color: rgba(89, 255, 107, .32);
  background: linear-gradient(180deg, #42d954 0%, #28bb38 100%);
  box-shadow: 0 10px 24px rgba(36, 210, 55, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.tbs-lgp-btn-outline {
  color: #ffffff !important;
  border-color: #2fd543;
  background: rgba(5, 18, 36, 0.58);
}

.tbs-lgp-btn-secondary {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(63, 79, 101, .86) 0%, rgba(42, 55, 75, .92) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tbs-lgp-btn-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  color: currentColor;
  font-size: 30px;
  line-height: 1;
  font-weight: 600;
}

.tbs-lgp-btn-icon svg {
  width: 28px;
  height: 28px;
  display: block;
  fill: currentColor;
}

.tbs-lgp-x-icon {
  font-size: 28px;
  font-family: Arial, Helvetica, sans-serif;
}

.tbs-lgp-fb-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #07172c;
  background: #ffffff;
  font-size: 26px;
  font-weight: 900;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 29px;
}

.tbs-lgp-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.tbs-lgp-footer-actions .tbs-lgp-btn {
  min-height: 56px;
  font-size: 18px;
}

@media (max-width: 520px) {
  .tbs-lgp-overlay {
    align-items: center;
    padding: 12px;
  }

  .tbs-lgp-modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 16px;
    padding: 28px 18px 22px;
  }

  .tbs-lgp-close {
    top: 13px;
    right: 14px;
    font-size: 34px;
  }

  .tbs-lgp-ticket-wrap {
    width: 120px;
    height: 74px;
    margin-bottom: 3px;
  }

  .tbs-lgp-ticket {
    width: 86px;
  }

  .tbs-lgp-title {
    font-size: 36px;
  }

  .tbs-lgp-subtitle {
    margin-top: 12px;
    margin-bottom: 20px;
    font-size: 21px;
    gap: 13px;
  }

  .tbs-lgp-subtitle span {
    width: 40px;
  }

  .tbs-lgp-prizes {
    gap: 10px;
    margin-bottom: 20px;
  }

  .tbs-lgp-prize-card {
    min-height: 92px;
    padding: 14px 10px;
    column-gap: 8px;
  }

  .tbs-lgp-prize-icon {
    font-size: 21px;
  }

  .tbs-lgp-prize-label {
    font-size: 15px;
  }

  .tbs-lgp-prize-card strong {
    font-size: 21px;
  }

  .tbs-lgp-copy {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
  }

  .tbs-lgp-actions {
    gap: 9px;
    margin-bottom: 20px;
  }

  .tbs-lgp-btn {
    min-height: 56px;
    padding: 12px 14px;
    font-size: 18px;
    gap: 12px;
  }

  .tbs-lgp-footer-actions {
    gap: 12px;
    padding-top: 18px;
  }

  .tbs-lgp-footer-actions .tbs-lgp-btn {
    min-height: 56px;
    font-size: 17px;
  }
}

@media (max-width: 370px) {
  .tbs-lgp-title {
    font-size: 32px;
  }

  .tbs-lgp-prizes {
    grid-template-columns: 1fr;
  }

  .tbs-lgp-footer-actions {
    grid-template-columns: 1fr;
  }
}

/* SEO/UX-safe refinement: keep close target easy and mobile popup less full-screen. */
.tbs-lgp-close {
  width: 44px;
  height: 44px;
  line-height: 38px;
}

@media (max-width: 520px) {
  .tbs-lgp-overlay {
    padding: 18px;
  }

  .tbs-lgp-modal {
    width: min(420px, calc(100vw - 36px));
    max-height: min(84vh, 720px);
    max-height: min(84dvh, 720px);
    border-radius: 15px;
    padding: 22px 16px 18px;
  }

  .tbs-lgp-close {
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    font-size: 34px;
    line-height: 38px;
  }

  .tbs-lgp-ticket-wrap {
    width: 106px;
    height: 58px;
    margin-bottom: 1px;
  }

  .tbs-lgp-ticket {
    width: 72px;
  }

  .tbs-lgp-spark {
    transform: scale(.75) rotate(25deg);
  }

  .tbs-lgp-title {
    font-size: 30px;
    letter-spacing: -0.035em;
  }

  .tbs-lgp-subtitle {
    margin-top: 8px;
    margin-bottom: 14px;
    font-size: 17px;
    gap: 10px;
  }

  .tbs-lgp-subtitle span {
    width: 30px;
  }

  .tbs-lgp-prizes {
    gap: 8px;
    margin-bottom: 14px;
  }

  .tbs-lgp-prize-card {
    min-height: 72px;
    padding: 11px 8px;
    column-gap: 7px;
  }

  .tbs-lgp-prize-icon {
    font-size: 18px;
  }

  .tbs-lgp-prize-label {
    font-size: 13px;
  }

  .tbs-lgp-prize-card strong {
    margin-top: 4px;
    font-size: 17px;
  }

  .tbs-lgp-copy {
    max-width: 340px;
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 14px;
  }

  .tbs-lgp-actions {
    gap: 7px;
    margin-bottom: 14px;
  }

  .tbs-lgp-btn {
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 15.5px;
    gap: 10px;
  }

  .tbs-lgp-btn-icon {
    width: 23px;
    height: 23px;
    flex-basis: 23px;
    font-size: 24px;
  }

  .tbs-lgp-btn-icon svg {
    width: 23px;
    height: 23px;
  }

  .tbs-lgp-fb-icon {
    width: 22px;
    height: 22px;
    font-size: 22px;
    line-height: 25px;
  }

  .tbs-lgp-footer-actions {
    gap: 10px;
    padding-top: 13px;
  }

  .tbs-lgp-footer-actions .tbs-lgp-btn {
    min-height: 46px;
    font-size: 15.5px;
  }
}

@media (max-width: 370px) {
  .tbs-lgp-overlay {
    padding: 14px;
  }

  .tbs-lgp-modal {
    width: calc(100vw - 28px);
    max-height: min(86vh, 720px);
    max-height: min(86dvh, 720px);
  }

  .tbs-lgp-title {
    font-size: 28px;
  }

  .tbs-lgp-prizes {
    grid-template-columns: 1fr 1fr;
  }

  .tbs-lgp-prize-card strong {
    font-size: 16px;
  }
}

/* v1.0.4: compact mobile bottom-card layout to reduce intrusive feel. */
@media (max-width: 520px) {
  .tbs-lgp-overlay {
    align-items: flex-end;
    justify-content: center;
    padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
    background: rgba(2, 8, 18, 0.56);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  body.tbs-lgp-locked {
    overflow: hidden !important;
  }

  .tbs-lgp-modal {
    width: min(360px, calc(100vw - 28px));
    max-height: 68vh;
    max-height: 68dvh;
    border-radius: 18px;
    padding: 17px 13px 13px;
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .tbs-lgp-close {
    top: 5px;
    right: 6px;
    width: 42px;
    height: 42px;
    font-size: 31px;
    line-height: 36px;
    background: rgba(255, 255, 255, 0.04);
  }

  .tbs-lgp-ticket-wrap {
    width: 86px;
    height: 42px;
    margin-bottom: 0;
  }

  .tbs-lgp-ticket {
    width: 56px;
    filter: drop-shadow(0 7px 12px rgba(54, 220, 72, .22));
  }

  .tbs-lgp-spark {
    transform: scale(.62) rotate(25deg);
    opacity: .74;
  }

  .tbs-lgp-title {
    font-size: 26px;
    line-height: 1.02;
    letter-spacing: -0.03em;
  }

  .tbs-lgp-subtitle {
    margin: 6px 0 10px;
    font-size: 14px;
    gap: 8px;
  }

  .tbs-lgp-subtitle span {
    width: 22px;
  }

  .tbs-lgp-prizes {
    gap: 7px;
    margin-bottom: 10px;
  }

  .tbs-lgp-prize-card {
    min-height: 58px;
    padding: 8px 7px;
    column-gap: 6px;
    border-radius: 8px;
  }

  .tbs-lgp-prize-icon {
    font-size: 16px;
  }

  .tbs-lgp-prize-label {
    font-size: 11.5px;
  }

  .tbs-lgp-prize-card strong {
    margin-top: 3px;
    font-size: 14.5px;
    letter-spacing: -0.01em;
  }

  .tbs-lgp-copy {
    max-width: 315px;
    font-size: 12.8px;
    line-height: 1.38;
    margin-bottom: 10px;
  }

  .tbs-lgp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
  }

  .tbs-lgp-actions .tbs-lgp-btn:first-child {
    grid-column: 1 / -1;
  }

  .tbs-lgp-btn {
    min-height: 38px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 13.2px;
    line-height: 1.12;
    gap: 7px;
  }

  .tbs-lgp-btn-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    font-size: 19px;
  }

  .tbs-lgp-btn-icon svg {
    width: 18px;
    height: 18px;
  }

  .tbs-lgp-x-icon {
    font-size: 18px;
  }

  .tbs-lgp-fb-icon {
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 20px;
  }

  .tbs-lgp-footer-actions {
    gap: 8px;
    padding-top: 10px;
  }

  .tbs-lgp-footer-actions .tbs-lgp-btn {
    min-height: 40px;
    font-size: 13.5px;
  }
}

@media (max-width: 370px) {
  .tbs-lgp-overlay {
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .tbs-lgp-modal {
    width: min(340px, calc(100vw - 20px));
    max-height: 70vh;
    max-height: 70dvh;
    padding: 15px 11px 11px;
  }

  .tbs-lgp-title {
    font-size: 24px;
  }

  .tbs-lgp-copy {
    font-size: 12.4px;
  }

  .tbs-lgp-btn {
    font-size: 12.6px;
    gap: 6px;
  }

  .tbs-lgp-prizes {
    grid-template-columns: 1fr 1fr;
  }

  .tbs-lgp-footer-actions {
    grid-template-columns: 1fr 1fr;
  }
}
