/* ===== Base ===== */

body {
  margin: 0;
  background: #fff;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
}

/* ===== Age gate ===== */

body.age-gate-open {
  overflow: hidden;
}

#age-gate {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.age-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 320px;
}

.age-logo {
  width: 90px;
  height: auto;
  margin-bottom: 16px;
}

.age-note {
  margin-bottom: 14px;
  color: #444;
  font-size: 0.9rem;
}

.age-input {
  width: 100%;
  max-width: 200px;
  padding: 8px 10px;
  margin: 0 auto 10px;
  display: block;
  text-align: center;
  border: 1px solid #ccc;
}

.age-btn {
  width: 100%;
  max-width: 200px;
  padding: 8px 10px;
  background: #000;
  color: #fff;
  border: none;
  cursor: pointer;
}

.age-btn:hover {
  opacity: 0.9;
}

.age-error {
  min-height: 18px;
  margin-top: 10px;
  color: #b00020;
  font-size: 0.8rem;
}

/* ===== Layout ===== */

header {
  text-align: center;
  margin-top: 40px;
}

header a {
  display: inline-block;
  text-decoration: none;
}

.logo {
  width: 160px;
  height: auto;
  display: block;
  margin: 0 auto;
}

main {
  max-width: 760px;
  margin: 48px auto 72px;
  padding: 0 20px;
  box-sizing: border-box;
}

section {
  margin-bottom: 56px;
}

/* ===== Headings & text ===== */

h1,
h2 {
  font-weight: 500;
  margin: 0 0 16px;
}

h2 {
  text-align: center;
  font-size: 1.05rem;
}

p {
  margin: 0 0 12px;
  text-align: justify;
}

/* ===== Channels ===== */

.channels {
  text-align: center;
  margin-top: 100px;
  margin-bottom: 60px;
}

.channels a {
  color: #000;
  text-decoration: none;
  margin: 0 6px;
}

.channels a:hover {
  text-decoration: underline;
}

/* ===== WeChat modal ===== */

.wechat-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 12000;
}

.wechat-modal.is-open {
  display: block;
}

.wechat-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.wechat-modal__content {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 300px;
  margin: 120px auto 0;
  padding: 20px 18px 22px;
  text-align: center;
  border-radius: 8px;
}

.wechat-modal__content h2,
.wechat-modal__content p {
  text-align: center; /* explicitly center both title and paragraph */
  margin: 0 0 10px;
}

.wechat-modal__qr {
  width: 180px;
  max-width: 100%;
  display: block;
  margin: 14px auto 0;
}

.wechat-modal__close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

@media (min-width: 768px) {
  .wechat-modal__content {
    margin-top: 140px;
  }
}

body.wechat-modal-open {
  overflow: hidden;
}

/* ===== Footer ===== */

footer {
  text-align: center;
  font-size: 0.8rem;
  color: #666;
  line-height: 1.6;
  margin: 80px 0 48px;
}

footer small {
  display: block;
  margin: 4px 0;
}

footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

footer a:hover {
  color: #000;
  text-decoration: underline;
}

@media (max-width: 480px) {
  footer {
    font-size: 0.78rem;
    line-height: 1.5;
    margin: 48px 0 36px;
  }
  footer small {
    margin: 3px 0;
  }
}
