body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background-image: url("../images/background_patten.png");
  background-size: 20px;
  position: relative;
  color: #1d1620;
}

html:lang(zh-Hans) body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Heiti SC", sans-serif;
}

html:lang(en) body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.app-shell {
  max-width: 990px;
  margin: 0 auto;
  width: 100%;
}

.top-gradient {
  height: 16px;
}

.top-gradient-mix {
  background: linear-gradient(90deg, #d5232a 0%, #1f2f5e 100%);
}

.top-gradient-female {
  background: linear-gradient(90deg, #d5232a 0%, #f07b8a 100%);
}

.top-gradient-male {
  background: linear-gradient(90deg, #1f4d88 0%, #101831 100%);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-pill {
  border: 0;
  border-radius: 999px;
  background: #e50012;
  color: #fff;
  font-weight: 700;
  padding: 6px 16px;
  cursor: default;

}

.lang-btn {
  border: 1px solid #f07b8a;
  border-radius: 999px;
  background: #f9c4cb;
  color: #ad2f45;
  font-weight: 700;
  padding: 6px 16px;
}

.lang-btn-active {
  background: #e50012;
  border-color: #e50012;
  color: #fff;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.vote-title {
  font-size: 60px;
  line-height: 1.05;
  font-weight: 800;
}

.vote-title span {
  color: #d70b1f;
}

.vote-title.male span {
  color: #1e3368;
}

.vote-subtitle {
  color: #67626a;
  font-size: 20px;
}

.candidate-card {
  display: flex;
  gap: 14px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
  align-items: center;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.candidate-card.dim {
  opacity: 0.35;
}

.candidate-card.active {
  border-color: #1f8f4b;
}

.candidate-card img {
  width: 30vw;
  height: 30vw;
  max-width: 400px;
  max-height: 400px;
  object-fit: cover;
}

.candidate-name {
  font-size: 44px;
  margin: 0;
  font-weight: 800;
}

.candidate-desc {
  margin: 0;
  color: #555;
  font-size: 24px;

}
#introVoteBtn{
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
}
#closeIntroBtn{
  border-radius: 999px;
  color: #747474!important;
  font-weight: 700;
  background-color: #d3d3d3!important;
  border: 0!important;
}
.actions {
  display: flex;
  gap: 10px;
}

.btn-sm-pill {
  border-radius: 999px;
  font-size: 24px;
  padding: 6px 16px;
  border: 0;
  color: #fff;
  font-weight: 700;
  width: 300px;
}

.btn-red-grad {
  background: linear-gradient(90deg, #d5232a 0%, #b00017 100%);
}

.btn-blue-grad {
  background: linear-gradient(90deg, #1f4d88 0%, #111827 100%);
}

.btn-selected {
  background: #1f8f4b;
}

.btn-gray {
  border-radius: 999px;
  border: 0;
  font-size: 24px;
  padding: 6px 20px;
  font-weight: 700;
  color: #555;
  background: #d5d7dc;
}

.selected-notice {
  margin-top: 14px;
  border-radius: 999px;
  border: 1px solid #e9a6ad;
  background: rgba(255, 214, 220, 0.6);
  padding: 8px 16px;
  font-weight: 800;
  color: #c7192e;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selected-notice-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.selected-notice-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e9a6ad;
}

.small-note {
  color: #888;
  font-size: 14px;
}

.small-note-btn {
  border: 0;
  background: transparent;
  color: #888;
  padding: 0;
}

.result-title {
  font-size: 46px;
  font-weight: 800;
}

.selected-pair {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.pair-card {
  width: 25%;
  border-radius: 12px;
  border: 2px solid #ccc;
  background: rgba(255, 255, 255, 0.8);
  padding: 8px;
  text-align: center;
}

.pair-card.female {
  border-color: #d5232a;
}

.pair-card.male {
  border-color: #1f2f5e;
}

.pair-card img {
  width: 100%;
  border-radius: 8px;
}

.pair-card strong {
  display: block;
  font-size: 16px;
}

.pair-card small {
  font-size: 12px;
  color: #444;
}

.result-points-image img {
  width: 100%;
}

.points-value {
  font-size: 62px;
  font-weight: 900;
}

.phone-wrap {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.8);
  padding: 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.phone-content{
  margin-top: 40px;
}
.qr-instruction{
  font-size: 24px;
}
.phone-bg {
 position: absolute;
 top: 30px;
 left: 50%;
 transform: translateX(-50%);
 width: 80%;
 z-index: -1;

}

.qr-instruction {
  color: #666;
}

.qr-box {
  width: 220px;
  height: 220px;
  margin: 12px auto;
  border-radius: 8px;
  border: 2px solid #d0d0d0;
  background: repeating-linear-gradient(45deg, #20345f, #20345f 6px, #fff 6px, #fff 12px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.qr-hidden {
  visibility: hidden;
}

.qr-count {
  color: #666;
  font-size: 24px;
}
#toggleQrBtn{
  font-size: 24px;
  color: #fff!important;
}
.btn-blue-open {
  border: 0;
  border-radius: 999px;
  background: #122d5a;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  padding: 12px 28px;
}

.redeem-cta-btn {
  width: 100%;
  max-width: 200px;
  padding: 8px 18px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 1px;
}

.redeem-card {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  padding: 20px;
}

.overlay-screen {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.overlay-screen.active {
  display: flex;
}

.member-login-overlay {
  z-index: 1200;
}

.member-login-hint {
  color: #444;
  line-height: 1.45;
}

.member-login-post-debug {
  color: #333;
}

.member-login-post-payload {
  margin-top: 6px;
  max-width: min(92vw, 520px);
  max-height: 180px;
  overflow: auto;
  background: #111;
  color: #eee;
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

body.member-login-required #app {
  pointer-events: none;
  user-select: none;
}

.vote-submit-loading-overlay {
  z-index: 1100;
}

.vote-submit-error-overlay {
  z-index: 1050;
}

.vote-submit-error-modal {
  min-height: auto;
}

.vote-submit-error-title {
  font-size: 28px;
  text-align: center;
  font-weight: 800;
}

.vote-submit-error-text {
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
  color: #555;
}

.vote-submit-loading-overlay .vote-submit-spinner {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(30, 51, 104, 0.18);
  border-top-color: #d5232a;
  border-right-color: #1e3368;
  animation: vote-submit-spin 0.75s linear infinite;
}

@keyframes vote-submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
}

.welcome-image {
  width: 100%;
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 20px;
}

.notice-modal,
.intro-modal {
  width: 80%;
  border-radius: 28px;
  background: #f7f7f7;
  padding: 20px;
  z-index: 1;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  min-height: 60vh;
  position: relative;
  overflow: hidden;
  max-width: 990px;
}

.intro-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px 20px 20px 20px;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.8) 60%, rgba(255, 255, 255, 0) 100%);
  padding-top: 100px;
  z-index: 1;
}

.notice-modal h3 {
  font-size: 48px;
  text-align: center;
  font-weight: 900;
  margin-bottom: 0;
}

.notice-modal p {
  text-align: center;
  color: #666;
  font-size: 30px;
}

.member-login-modal h3 {
  font-size: 34px;
}

.member-login-desc {
  font-size: 16px !important;
  margin-bottom: 12px;
}

.member-login-input {
  height: 46px;
  border-radius: 12px;
  font-size: 16px;
}

.member-login-error {
  color: #c81e1e;
  font-size: 14px;
  margin-top: 8px;
  text-align: left;
}

.member-login-btn {
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  min-width: 120px;
}

.member-login-modal {
  max-width: 420px;
}

.notice-list {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  padding: 14px;
}

.notice-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 18px;
  margin-bottom: 12px;
}

.notice-item img {
  width: 24px;
}

.terms-page {
  padding: 20px 16px 28px;
}

.terms-title-wrap {
  margin-top: 24px;
}

.terms-title-pill {
  display: inline-block;
  border-radius: 999px;
  background: #e50012;
  color: #fff;
  font-weight: 800;
  font-size: 48px;
  line-height: 1.1;
  padding: 8px 22px;
  margin-bottom: 12px;
}

.terms-title-wrap h2 {
  font-size: 48px;
  line-height: 1;
  font-weight: 900;
  margin: 0;
}

.terms-title-wrap p {
  margin: 10px 0 0;
  color: #8e8e8e;
  font-size: 20px;
}

.terms-card {
  margin-top: 22px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.8);
  padding: 20px 18px;
}

.terms-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 24px;
  line-height: 1.7;
  margin-bottom: 20px;
  align-items: center;
}

.terms-item:last-child {
  margin-bottom: 0;
}

.terms-item img {
  width: 120px;
  flex: 0 0 40px;
  margin-top: 4px;
}

.terms-back-btn {
  display: block;
  margin: 22px auto 0;
  border-radius: 999px;
  border: 0;
  background: #c7c7c7;
  color: #444;
  font-size: 20px;
  font-weight: 700;
  padding: 10px 36px;
}

.intro-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: -1;
}

.intro-modal h3 {
  font-size: 24px;
  font-weight: 800;
}

.intro-modal p {
  margin-bottom: 8px;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-size: 14px;
}
  .intro-grid>div{
   position: relative;
   padding-right: 4px;

  }
  .intro-grid>div:after{
    content: '';
    position: absolute;
    right: 0;
    top: 20px;
    bottom: 0;
    width: 1px;
    background: #ccc;
  }
  .intro-grid>div:last-child:after{
    display: none;
  }
.intro-grid small {
  display: block;
  color: #666;
}

.intro-grid strong {
  display: block;
}
.small-note-btn{
  font-size: 20px;
}
.app-header button{
  font-size: 24px;
}
@media (max-width: 575px) {
  .pair-card{
    width: 40%;
  }
  .small-note-btn{
    font-size: 12px;
  }
  .candidate-card img {
    width: 100px;
    height: 100px;
  }
  .btn-sm-pill{
    font-size: 14px;
    padding: 3px 10px;
    width: auto;
  }
  .intro-grid{
    font-size: 12px;
  }
  .btn-gray{
    padding: 3px 10px;
    font-size: 14px;
  }

  .app-header button {
    font-size: 12px;
    padding: 4px 8px;
  }

  .vote-title {
    font-size: 30px;
  }
  .vote-subtitle {
    font-size: 12px;
  }
  .candidate-name {
    font-size: 20px;
  }

  .candidate-desc {
    font-size: 14px;
  }

  .notice-modal h3 {
    font-size: 34px;
  }

  .notice-modal p {
    font-size: 18px;
  }

  .points-value {
    font-size: 52px;
  }

  .redeem-cta-btn {

    font-size: 20px;
  }

  .terms-page {
    padding: 18px 12px 22px;
  }

  .terms-title-wrap {
    margin-top: 8px;
  }

  .terms-title-pill {
    font-size: 22px;
    padding: 8px 14px;
    margin-bottom: 8px;
  }

  .terms-title-wrap h2 {
    font-size: 34px;
  }

  .terms-title-wrap p {
    font-size: 16px;
    margin-top: 6px;
  }

  .terms-card {
    margin-top: 14px;
    border-radius: 20px;
    padding: 14px 12px;
  }

  .terms-item {
    font-size: 14px;
    line-height: 1.5;
    gap: 10px;
    margin-bottom: 14px;
  }

  .terms-item img {
    width: 80px;
    flex-basis: 28px;
    margin-top: 2px;
  }

  .terms-back-btn {
    margin-top: 16px;
    font-size: 18px;
    padding: 8px 30px;
  }

}
