.title {
  font-size: 26px;
  font-weight: 800;
  margin: 4px 0 12px;
  letter-spacing: 0.4px;
}

.mobile-page {
  min-height: 100dvh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(8px);
}

.mobile-header-back {
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #111827;
  font-size: 32px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  line-height: 1;
}

.mobile-header-back.mobile-header-back-text {
  left: 12px;
  width: auto;
  min-width: 48px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(119, 190, 234, 0.18);
  color: #2f79a8;
  font-size: 13px;
  font-weight: 700;
  line-height: 32px;
}

.mobile-header-center {
  width: calc(100% - 112px);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 4px 0;
  box-sizing: border-box;
}

.mobile-header-logo {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.mobile-header-spacer {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
}

.mobile-page-body {
  padding: 12px 16px 24px;
  box-sizing: border-box;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.mobile-page-body > * {
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.mobile-page img,
.mobile-page canvas,
.mobile-page svg,
.mobile-page video {
  max-width: 100%;
}

.mobile-page button,
.mobile-page input,
.mobile-page textarea,
.mobile-page select {
  max-width: 100%;
}

@media (min-width: 768px) {
  .title {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .mobile-header {
    height: 52px;
    padding: 0 10px;
  }

  .mobile-header-back {
    left: 2px;
    width: 34px;
    height: 34px;
    font-size: 28px;
  }

  .mobile-header-back.mobile-header-back-text {
    left: 10px;
    min-width: 44px;
    height: 30px;
    padding: 0 9px;
    font-size: 12px;
    line-height: 30px;
  }

  .mobile-header-center {
    width: calc(100% - 84px);
    padding: 3px 0;
  }

  .mobile-header-logo {
    height: 100%;
  }

  .mobile-header-spacer {
    right: 10px;
    width: 34px;
    height: 34px;
  }

  .mobile-page-body {
    padding: 10px 12px 18px;
  }
}

.bottom-tab {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  background: #fff;
  z-index: 100;
}

.bottom-tab a {
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #9aa3b2;
  font-size: 13px;
  font-weight: 800;
  position: relative;
}

.bottom-tab a.active {
  color: var(--text);
  background: linear-gradient(
    135deg,
    rgba(0, 198, 255, 0.14),
    rgba(255, 122, 89, 0.14)
  );
  cursor: default;
}

.bottom-tab a.active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.psh-sheet-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  justify-content: center;
  align-content: center;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
}

.psh-sheet-modal.hidden {
  display: none;
}

.psh-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.psh-sheet-card {
  position: relative;
  width: clamp(300px, 86vw, 420px);
  height: 100vh;
  max-height: 640px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  border-radius: 18px;
  overflow: hidden;
}

.psh-sheet-header {
  flex: 0 0 auto;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 16px;
  font-weight: 800;
}

.psh-sheet-title {
  flex: 1;
  text-align: center;
}

.psh-sheet-close {
  position: absolute;
  right: 12px;
  top: 8px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: #111827;
}

.psh-sheet-body {
  flex: 1 1 auto;
  background: #77BEEA;
  color: #ffffff;
  padding: 18px 18px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.psh-sheet-body-inner {
  font-size: 14px;
  line-height: 2;
  font-weight: bold;
}

.psh-sheet-body-inner h1,
.psh-sheet-body-inner h2,
.psh-sheet-body-inner h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  padding-bottom: 8px;
}

.psh-sheet-body-inner p {
  margin: 0 0 8px;
}

.psh-sheet-body-inner .service-agreement p {
  text-indent: 2em;
}

.psh-sheet-footer {
  flex: 0 0 auto;
  padding: 10px 18px 18px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.psh-sheet-tip {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.6;
  color: #2f79a8;
  text-align: center;
}

.psh-sheet-tip.hidden {
  display: none;
}

.psh-sheet-btn {
  display: block;
  width: 70%;
  max-width: 260px;
  height: 44px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  background: #77BEEA;
  box-shadow: 0 8px 18px rgba(119, 190, 234, 0.35);
  cursor: pointer;
  margin: 0 auto;
}

.psh-sheet-btn:disabled {
  background: #a9d7f2;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  cursor: not-allowed;
}

.psh-sheet-btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(255, 122, 173, 0.4);
}

/* Event-reg small-screen baseline, scoped to avoid impacting non event pages. */
@media (max-width: 380px), (max-height: 700px) {
  .event-reg-page img {
    max-width: 100%;
  }

  .event-reg-page canvas,
  .event-reg-page svg {
    max-width: 100%;
    height: auto;
  }

  .event-reg-page .bottom-tab {
    height: 44px;
  }

  .event-reg-page .bottom-tab a {
    font-size: 12px;
  }

  .event-reg-page .psh-sheet-card {
    width: min(94vw, 420px);
    height: min(88vh, 620px);
    border-radius: 14px;
  }

  .event-reg-page .psh-sheet-header {
    height: 44px;
    font-size: 15px;
  }

  .event-reg-page .psh-sheet-body {
    padding: 12px 12px 16px;
  }

  .event-reg-page .psh-sheet-body-inner {
    font-size: 13px;
    line-height: 1.8;
  }

  .event-reg-page .psh-sheet-footer {
    padding: 8px 12px 12px;
  }

  .event-reg-page .psh-sheet-btn {
    width: 78%;
    height: 40px;
    font-size: 14px;
  }

  .event-reg-page .poster-modal-dialog {
    inset: 14px 8px;
    border-radius: 12px;
  }

  .event-reg-page .poster-modal-close {
    right: 8px;
    top: 8px;
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
}
