:root {
  --page-bg: #fffbe8;
  --panel-bg: #f6ebdc;
  --panel-bg-deep: #f1e2cb;
  --panel-line: #e6cf9e;
  --title-brown: #5a4933;
  --text-main: #3f372d;
  --text-soft: #796955;
  --chip-blue: #8ba3c7;
  --chip-blue-deep: #6d89b4;
  --banner-bg: #efe0ad;
  --banner-line: #e0cf96;
  --rules-green: #a9bea0;
  --rules-green-deep: #8fad86;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--page-bg);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
}

body {
  display: flex;
  justify-content: center;
}

.page-shell {
  width: 100%;
  max-width: 375px;
  min-height: 100vh;
}

.phone-frame {
  width: 100%;
  padding-bottom: 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 12px;
  background: transparent;
}

.icon-button {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7b6f60;
  font-size: 20px;
  line-height: 1;
}

.topbar-center {
  text-align: center;
}

.topbar-center strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #46392b;
}

.topbar-center span {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: #a99a87;
}

.hero-section {
  padding: 10px 12px 0;
}

.hero-banner {
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
}

.hero-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-figures {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 76px;
}

.hero-figure {
  display: block;
  width: 76px;
  height: 72px;
}

.hero-figure-center {
  width: 84px;
  height: 80px;
  margin: 0 -4px;
}

.hero-brand-mark {
  position: absolute;
  right: 6px;
  top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #75644d;
  letter-spacing: 1px;
}

.brand-panel {
  position: relative;
  margin-top: -4px;
  padding: 10px 16px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247, 235, 221, 0.96), rgba(242, 226, 204, 0.98));
  box-shadow: 0 8px 18px rgba(125, 94, 53, 0.12);
  border: 1px solid rgba(230, 207, 158, 0.8);
  text-align: center;
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 14px;
  border: 1px solid rgba(247, 235, 213, 0.9);
  pointer-events: none;
}

.brand-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #6b5943;
  letter-spacing: 1px;
}

.brand-title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #765c3e;
  font-size: 52px;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 4px 0 rgba(255, 248, 238, 0.96);
}

.brand-subtitle {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
  color: #5e4b36;
}

.brand-tips {
  position: relative;
  z-index: 1;
  margin: 6px 0 0;
  font-size: 10px;
  line-height: 1.5;
  color: #7c6a54;
  letter-spacing: 1px;
}

.wing {
  position: absolute;
  top: 56px;
  width: 28px;
  height: 18px;
  background: #ecd8ac;
  clip-path: polygon(0 50%, 74% 0, 100% 50%, 74% 100%);
}

.wing-left {
  left: 10px;
}

.wing-right {
  right: 10px;
  transform: scaleX(-1);
}

.intro {
  padding: 12px 16px 0;
  text-align: center;
}

.intro h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 900;
  color: #2f2d2d;
}

.intro p {
  margin: 8px 0 0;
  font-size: 9px;
  line-height: 1.6;
  color: #514a40;
  font-weight: 700;
}

.quick-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.quick-label {
  min-width: 32px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--chip-blue-deep);
  color: #ffffff;
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 2px 0 rgba(109, 137, 180, 0.45);
}

.board-list {
  margin: 12px auto 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.board-list li {
  min-width: 0;
}

.board-tab {
  position: relative;
  width: 100%;
  min-height: 42px;
  padding: 0 8px 10px;
  border: 0;
  background: transparent;
  color: #746756;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.board-tab::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--chip-blue-deep);
  opacity: 0.24;
  transform: scaleX(0.35);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.board-tab.is-active {
  color: var(--chip-blue-deep);
  transform: translateY(-1px);
}

.board-tab.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.board-tab:focus-visible {
  outline: 2px solid rgba(109, 137, 180, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

.notice-bar {
  padding: 14px 10px 0;
}

.section-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--banner-line);
  background: var(--banner-bg);
  color: #3f372d;
  font-size: 11px;
  font-weight: 800;
}

.badge {
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--chip-blue);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
}

.characters {
  padding: 12px 12px 0;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 8px;
}

.character-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.character-card:active {
  transform: scale(0.96);
  opacity: 0.88;
}

.character-card:active .character-avatar {
  filter: brightness(0.94);
}

.character-card:active .character-name {
  color: #6b5a46;
}

.character-card:focus-visible {
  outline: 2px solid rgba(139, 163, 199, 0.8);
  outline-offset: 4px;
}

.character-avatar {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background-color: #ddd4c6;
  border: 2px solid rgba(255, 255, 255, 0.82);
}

/* 性能优化：预设背景色减少白屏感 */
.character-avatar-image-wrap, 
.benefit-avatar-image-wrap,
.rights-image-card {
  background-color: #f0e6d2;
  position: relative;
  overflow: hidden;
}

.character-avatar-image-wrap::after,
.benefit-avatar-image-wrap::after,
.rights-image-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.character-avatar-image,
.benefit-avatar-image,
.rights-image-card img {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.character-avatar-image[src],
.benefit-avatar-image[src],
.rights-image-card img[src] {
  opacity: 1;
}

.character-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-name {
  max-width: 72px;
  min-height: 26px;
  font-size: 9px;
  line-height: 1.3;
  font-weight: 700;
  color: #4b4033;
  text-align: center;
}

.character-card-primary .character-avatar {
  width: 72px;
  height: 72px;
  border-radius: 0;
  border: 0;
  background-color: transparent;
}

.character-card-primary .character-name {
  max-width: 76px;
}

.benefits {
  padding: 12px 18px 0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.benefit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.benefit-card:active,
.rule-image-link:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.benefit-card:focus-visible,
.rule-image-link:focus-visible {
  outline: 2px solid rgba(139, 163, 199, 0.8);
  outline-offset: 4px;
}

.benefit-avatar {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background-color: #e1d5c4;
  border: 2px solid rgba(255, 255, 255, 0.82);
}

.benefit-avatar-image-wrap {
  overflow: hidden;
}

.benefit-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.benefit-card h3 {
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 700;
  color: #4b4033;
  text-align: center;
}

.rules {
  padding: 12px 10px 0;
}

.rules-list {
  display: grid;
  gap: 12px;
}

.rights-image-card {
  overflow: hidden;
  border-radius: 10px;
}

.rights-image-card img {
  display: block;
  width: 100%;
  height: auto;
}

.rule-image-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.rule-image-title {
  margin: 8px 2px 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 700;
  color: #4b4033;
}

.rules-poster {
  padding: 6px;
  background: linear-gradient(180deg, var(--rules-green) 0%, #b7caa8 100%);
  border: 1px solid #95b287;
}

.window-bar {
  display: flex;
  gap: 4px;
  padding: 2px 8px 6px;
}

.window-bar span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.rule-card {
  position: relative;
  margin: 0;
  padding: 6px;
  background: linear-gradient(180deg, #afc49c 0%, #c2d3ae 100%);
  border: 1px solid rgba(108, 133, 81, 0.25);
}

.rule-card + .rule-card {
  margin-top: 8px;
}

.rule-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 8px;
  align-items: start;
  padding: 10px 8px 10px 12px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.93), rgba(251, 248, 241, 0.88)),
    repeating-linear-gradient(
      180deg,
      rgba(105, 120, 80, 0.06) 0 1px,
      rgba(255, 255, 255, 0) 1px 15px
    );
  border: 1px solid rgba(133, 112, 78, 0.08);
}

.rule-copy {
  min-width: 0;
}

.rule-tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(90, 113, 63, 0.12);
  color: #657c49;
  font-size: 8px;
  font-weight: 700;
}

.rule-card h3 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  color: #5a713f;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #ffffff;
}

.rule-card ul {
  margin: 0;
  padding-left: 14px;
  font-size: 8px;
  line-height: 1.7;
  color: #5b5446;
}

.rule-side-art {
  width: 54px;
  height: 90px;
  align-self: end;
  border-radius: 12px;
  background-color: #d9d9d9;
  border: 2px solid rgba(255, 255, 255, 0.75);
}

.rule-card-bottom .rule-card-body {
  grid-template-columns: minmax(0, 1fr) 58px;
}

.rule-card-bottom h3 {
  font-size: 18px;
  line-height: 1.1;
}

.rule-card-bottom .rule-side-art {
  height: 78px;
}

.rule-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 6px 4px;
}

.rule-footer-note {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.42);
  color: #55723b;
  font-size: 8px;
  font-weight: 700;
}

.rule-cta {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(111, 176, 101, 0.28), rgba(84, 151, 75, 0.2));
  color: #2f6b2c;
  font-size: 10px;
  font-weight: 700;
}

.page-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 18px 0 8px;
}

.page-footer p {
  margin: 0;
  font-size: 8px;
  color: #8c7b67;
}

.sprite {
  background-image: url("./123.jpg");
  background-repeat: no-repeat;
  background-size: 192px 800px;
}

.sprite-hero-left {
  background-position: -10px -49px;
  background-size: 158px 660px;
}

.sprite-hero-center {
  background-position: -47px -48px;
  background-size: 170px 710px;
}

.sprite-hero-right {
  background-position: -96px -50px;
  background-size: 162px 675px;
}

.sprite-role-1 {
  background-image: url("./九宫格一.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.sprite-role-2 {
  background-image: url("./九宫格二.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.sprite-role-3 {
  background-image: url("./九宫格三.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.sprite-role-4 {
  background-image: url("./九宫格四.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.sprite-role-5 {
  background-image: url("./九宫格五.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.sprite-role-6 {
  background-image: url("./九宫格六.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.sprite-role-7 {
  background-image: url("./九宫格七.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.sprite-role-8 {
  background-image: url("./九宫格八.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.sprite-role-9 {
  background-image: url("./九宫格九.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.sprite-benefit-left {
  background-position: -14px -450px;
  background-size: 154px 640px;
}

.sprite-benefit-right {
  background-position: -74px -450px;
  background-size: 154px 640px;
}

.sprite-rule-side {
  background-position: -98px -518px;
  background-size: 158px 660px;
}

.sprite-rule-bottom {
  background-position: -13px -592px;
  background-size: 154px 640px;
}

@media (max-width: 360px) {
  .hero-section {
    padding-left: 10px;
    padding-right: 10px;
  }

  .brand-title {
    font-size: 46px;
  }

  .intro h2 {
    font-size: 15px;
  }

  .characters-grid {
    gap: 10px 6px;
  }

  .character-avatar,
  .benefit-avatar {
    width: 58px;
    height: 58px;
  }

  .rule-card h3 {
    font-size: 20px;
  }

  .rule-card-bottom h3 {
    font-size: 16px;
  }
}
