html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== 活动打卡地图页（MyEvent） ===== */
body {
  background-color: #0a1a8c;
  background-image: url("../images/body-bg.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}

.event-body {
  margin: 0;
}

.event-shell {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 140px;
}

.event-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 25, 110, 0.55), rgba(0, 25, 110, 0));
}

.event-topbar a {
  color: #fff;
  text-decoration: none;
  margin-left: 12px;
  opacity: 0.9;
}

.event-topbar a:hover {
  opacity: 1;
  text-decoration: underline;
}

.event-kv img {
  display: block;
  width: 100%;
}

.event-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 4px 12px 0;
}

.event-status .chip {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
}

.event-status .chip b {
  font-size: 14px;
}

.event-tip {
  margin: 8px 16px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

.event-map {
  position: relative;
  margin-top: 2%;
}

.event-map > .map-bg {
  display: block;
  width: 100%;
}

.map-node {
  position: absolute;
  width: 18%;
  display: block;
}

.map-node img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 40, 0.35));
}

.map-node.done {
  width: 21%;
}

.map-node:not(.done):active img {
  transform: scale(0.95);
}

.event-records {
  margin: 24px 16px;
  color: #fff;
}

.event-records h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.event-records p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.record-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 13px;
}

.record-row .r-name {
  flex: 1;
}

.record-row .r-time {
  color: rgba(255, 255, 255, 0.7);
}

.event-board {
  display: flex;
  align-items: stretch;
  gap: 4.8%;
  padding: 0 4.7% 0 3.5%;
  margin-top: 8px;
}

.board-rules {
  width: 72.7%;
}

.board-rules img {
  display: block;
  width: 100%;
}

.board-actions {
  width: 22.6%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.board-btn {
  display: block;
}

.board-btn img {
  display: block;
  width: 100%;
}

.board-btn.off {
  cursor: not-allowed;
}

.rules-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 10, 60, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.rules-overlay[hidden] {
  display: none;
}

.rules-overlay img {
  width: 100%;
  max-width: 640px;
}

.event-toast {
  position: fixed;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  max-width: 86%;
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7dbd, #ffb1d9);
  color: #7a1043;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 60, 0.35);
  transition: opacity 0.6s ease;
}

.event-toast.fade-out {
  opacity: 0;
}

.congrats-card {
  position: relative;
  width: 100%;
  max-width: 520px;
}

.congrats-card > img {
  display: block;
  width: 100%;
  border-radius: 18px;
}

.congrats-btn {
  position: absolute;
  left: 21%;
  top: 83.5%;
  width: 58%;
  height: 7.5%;
}

.congrats-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #333;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.milestone-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  container-type: inline-size;
}

.milestone-card > img {
  display: block;
  width: 100%;
}

.milestone-card .ms-num {
  position: absolute;
  transform: translate(-50%, -50%);
  font-weight: 800;
  line-height: 1;
  font-size: 13cqw;
  background: linear-gradient(180deg, #fff3c4 0%, #f8c14a 45%, #dd8a1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /*-webkit-text-stroke: 0.05em #fff8e8;*/
  filter: drop-shadow(0 0.06em 0.06em rgba(110, 60, 0, 0.4));
}

.milestone-card .ms-chapters {
  left: 48.7%;
  top: 31.5%;
}

.milestone-card .ms-times {
  left: 52.9%;
  top: 44%;
}

.milestone-close {
  position: absolute;
  left: 69%;
  top: 9%;
  width: 15%;
  height: 15%;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.story-placeholder {
  padding: 40vh 24px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
}

.story-stage {
  position: relative;
  max-width: 560px;
  margin: 12px auto 0;
}

.story-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
}

.story-hole {
  position: absolute;
  left: 7.99%;
  top: 14.99%;
  width: 83.85%;
  height: 72.46%;
  border-radius: 20px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 0;
}

.story-hole p {
  color: #fff;
  font-size: 14px;
  text-align: center;
  background: rgba(30, 50, 110, 0.55);
  border-radius: 10px;
  padding: 10px 14px;
  text-shadow: 0 1px 4px rgba(0, 0, 60, 0.6);
}
.story-textbg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 2;
  pointer-events: none;
}

.story-final {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  z-index: 3;
}

.story-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 48px;
}

.story-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 34px;
  background: linear-gradient(90deg, #7b5cff, #4b8cff);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(60, 60, 200, 0.4);
}

.story-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.story-save {
  display: inline-block;
  border-radius: 999px;
  padding: 12px 34px;
  background: linear-gradient(90deg, #ff7dbd, #ffb1d9);
  color: #7a1043;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(200, 60, 160, 0.35);
}

.story-tip {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

.story-save[hidden] {
  display: none;
}

/* ===== 祝福墙页 ===== */
.blessing-body {
  background-color: #d8e8fb;
  background-image: url("../images/blessing-bg.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-attachment: fixed;
  overflow: hidden;
}

.blessing-body .event-shell {
  max-width: 100%;
  padding-bottom: 0;
}

.blessing-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #16337f;
}

.blessing-wrap {
  padding: 0;
  color: #16337f;
}

.blessing-sub {
  text-align: center;
  font-size: 16px;
  color: #33549f;
  margin: 4px 0 14px;
}

.blessing-msg {
  margin: 0 auto 12px;
  max-width: 480px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  color: #1d7a3e;
  font-size: 13px;
  text-align: center;
}

.blessing-form {
  width: 100%;
  max-width: 640px;
  margin: 0;
}

.blessing-form textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid rgba(120, 160, 220, 0.8);
  padding: 14px 16px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: #16337f;
  resize: vertical;
}

.blessing-form button {
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  padding: 10px 30px;
  background: linear-gradient(90deg, #2f6fe4, #4b8cff);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 80, 200, 0.35);
}

.blessing-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 768px) {
  .blessing-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .blessing-list {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.blessing-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px;
}

.blessing-card small {
  color: #6b87c4;
}

/* ===== 奖品兑换页（Redeem） ===== */
.redeem-body .event-shell {
  padding-bottom: 0;
}

.redeem-body main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.redeem-stage {
  position: relative;
  width: 90%;
  margin: 0 auto;
}

.redeem-stage > .redeem-dialog {
  display: block;
  width: 100%;
}

.redeem-count {
  position: absolute;
  left: 19.9%;
  top: 38.5%;
  width: 58.7%;
}

.redeem-count > img:first-child {
  display: block;
  width: 100%;
}

.redeem-num {
  position: absolute;
  left: 65%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 123%;
  width: auto;
}

.redeem-num-text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  font-weight: 800;
  color: #e8a33c;
  text-shadow: 0 2px 4px rgba(120, 70, 0, 0.45);
}

.redeem-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4%;
  margin-bottom: auto;
  padding-bottom: 4px;
}

.redeem-action form {
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: center;
}

.redeem-btn {
  display: block;
  width: 56%;
  border: 0;
  padding: 0;
  background: transparent;
}

.redeem-btn img {
  display: block;
  width: 100%;
}

.redeem-btn:active img {
  transform: scale(0.97);
}

.redeem-btn.off {
  opacity: 0.45;
  cursor: not-allowed;
}

.redeem-tip {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

/* ===== 登录页 ===== */
.login-wrap {
  display: flex;
  justify-content: center;
  padding: 0 16px 60px;
  margin-top: -6%;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 24px 22px;
  box-shadow: 0 10px 30px rgba(0, 10, 80, 0.35);
  text-align: center;
  color: #16337f;
}

.login-card h2 {
  font-size: 20px;
  margin-bottom: 6px;
}

.login-card p {
  font-size: 13px;
  color: #5a74b8;
  margin-bottom: 14px;
}

.login-error {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(220, 53, 69, 0.12);
  color: #b02a37;
  font-size: 13px;
}

.login-card input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(120, 160, 220, 0.8);
  padding: 12px 14px;
  font-size: 16px;
  color: #16337f;
  background: #fff;
  margin-bottom: 12px;
}

.login-card button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 11px 0;
  background: linear-gradient(90deg, #2f6fe4, #4b8cff);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 80, 200, 0.35);
}