/* ============================================================
   Portal theme — mir.cn-style 古典水墨/羊皮纸 design language
   Palette & typography extracted from the reference site:
   ink #473928 · gold #a38b6d/#d8bd8a · parchment #e9e3d7
   crimson accent #8c1812 · KaiTi (楷体) headings · sharp corners
   ============================================================ */
:root {
  --portal-ink: #473928;
  --portal-ink-soft: #6b5d4f;
  --portal-ink-muted: #8b7355;
  --portal-gold: #a38b6d;
  --portal-gold-bright: #d8bd8a;
  --portal-gold-deep: #8b6f47;
  --portal-crimson: #8c1812;
  --portal-crimson-bright: #b3221a;
  --portal-red: #d32f2f;
  --portal-parchment: #e9e3d7;
  --portal-paper: #f9f9f9;
  --portal-paper-2: #f5f5f5;
  --portal-border: #dcdcdc;
  --portal-border-gold: #cdbb95;
  --portal-header-bg: #16110b;
  --portal-header-bg-solid: #16110b;

  /* compatibility aliases (older class refs) */
  --portal-text: var(--portal-ink);
  --portal-muted: var(--portal-ink-muted);
  --portal-card: #ffffff;
  --portal-bg-mid: var(--portal-header-bg);

  --portal-hero-min-height: 92svh;
  --portal-font-serif: "KaiTi", "STKaiti", "SimKai", "Noto Serif SC", "Songti SC", serif;
  --portal-font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html { scroll-behavior: smooth; }

#mainContent { scroll-margin-top: 5rem; }

body.portal-body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--portal-ink);
  font-family: var(--portal-font-sans);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(163, 139, 109, 0.18), transparent 38rem),
    linear-gradient(180deg, #efe9dd 0%, #e9e3d7 30%, #efe9dd 100%);
}

body.portal-landing .portal-gnb {
  display: none;
}

.portal-body .page-shell {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6.5rem 1.25rem 3rem;
}

.portal-body.portal-landing .page-shell {
  max-width: none;
  padding: 0;
}

/* ===== GNB / header (dark bar, gold serif nav) ===== */
.portal-gnb {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: rgba(22, 17, 11, 0.92);
  border-bottom: 1px solid rgba(163, 139, 109, 0.35);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.portal-gnb.is-scrolled {
  background: var(--portal-header-bg-solid);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.portal-gnb .navbar {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.portal-gnb .navbar-brand {
  font-family: var(--portal-font-serif);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.18em;
  color: var(--portal-gold-bright);
}

.portal-gnb .navbar-brand--minimal {
  min-width: 2.5rem;
  min-height: 2rem;
  padding-left: 0;
  padding-right: 0;
}

.portal-gnb .nav-link {
  font-family: var(--portal-font-serif);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--portal-gold-bright);
  position: relative;
  padding-left: 1rem;
  padding-right: 1rem;
}

.portal-gnb .nav-link:hover,
.portal-gnb .nav-link.active {
  color: #f3e6c4;
}

.portal-gnb .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: -0.55rem;
  height: 2px;
  background: var(--portal-crimson);
}

.portal-gnb .navbar-toggler {
  border: 1px solid rgba(216, 189, 138, 0.55);
  padding: 0.4rem 0.55rem;
}

.portal-gnb .navbar-toggler:focus {
  box-shadow: 0 0 0 0.15rem rgba(216, 189, 138, 0.35);
}

.portal-gnb .navbar-toggler-icon {
  width: 1.45em;
  height: 1.45em;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23d8bd8a' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.2' d='M4 8h22M4 15h22M4 22h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

.portal-gnb .dropdown-menu {
  background: var(--portal-header-bg-solid);
  border: 1px solid rgba(163, 139, 109, 0.35);
  border-radius: 0;
}

.portal-gnb .dropdown-item {
  color: var(--portal-gold-bright);
  font-family: var(--portal-font-serif);
  letter-spacing: 0.05em;
}

.portal-gnb .dropdown-item:hover {
  background: rgba(163, 139, 109, 0.18);
  color: #f3e6c4;
}

.portal-gnb .dropdown-divider {
  border-color: rgba(163, 139, 109, 0.3);
}

/* 移动端导航：折叠菜单内纵向排列，避免顶栏挤爆 */
@media (max-width: 991.98px) {
  .portal-gnb .container {
    max-width: 100%;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .portal-gnb .navbar-brand {
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    max-width: calc(100% - 3.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .portal-gnb .navbar-collapse {
    max-height: 75vh;
    overflow-y: auto;
    padding: 0.35rem 0 0.75rem;
  }

  .portal-gnb .navbar-nav.me-auto,
  .portal-gnb .navbar-nav.ms-auto {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100%;
    align-items: stretch !important;
  }

  .portal-gnb .navbar-nav.ms-auto {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(163, 139, 109, 0.28);
  }

  .portal-gnb .nav-link {
    padding: 0.55rem 0.5rem;
    font-size: 0.95rem;
  }

  .portal-gnb .nav-link.active::after {
    display: none;
  }

  .portal-gnb .dropdown-menu {
    position: static !important;
    float: none;
    width: 100%;
    margin: 0.15rem 0 0.35rem;
  border: none;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: none;
  }

  .portal-gnb .navbar-nav .btn {
    width: 100%;
    margin-top: 0.25rem;
  }
}

/* ===== Buttons ===== */
.portal-btn-primary {
  background: var(--portal-crimson);
  border: 1px solid var(--portal-crimson);
  color: #f3e6c4;
  font-family: var(--portal-font-serif);
  font-weight: 600;
  border-radius: 0;
  padding: 0.6rem 1.7rem;
  letter-spacing: 0.1em;
}

.portal-btn-primary:hover {
  background: var(--portal-crimson-bright);
  border-color: var(--portal-crimson-bright);
  color: #fff;
}

.portal-btn-outline {
  border: 1px solid var(--portal-gold);
  color: var(--portal-gold-deep);
  background: transparent;
  border-radius: 0;
  padding: 0.6rem 1.7rem;
  font-family: var(--portal-font-serif);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.portal-btn-outline:hover {
  background: var(--portal-gold);
  color: #fff;
  border-color: var(--portal-gold);
}

/* ===== Landing hero ===== */
.portal-hero {
  position: relative;
  min-height: var(--portal-hero-min-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 7rem 1.5rem 3rem;
}

.portal-hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 15, 10, 0.45), rgba(20, 15, 10, 0.78)),
    url("/img/portal-hero.png");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.portal-hero__orb { display: none; }

.portal-hero__content {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.portal-hero__eyebrow {
  display: inline-block;
  padding: 0.3rem 1.2rem;
  border: 1px solid rgba(216, 189, 138, 0.6);
  background: rgba(20, 15, 10, 0.4);
  color: var(--portal-gold-bright);
  font-family: var(--portal-font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.4em;
}

.portal-hero__title {
  font-family: var(--portal-font-serif);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 1.4rem 0 1rem;
  letter-spacing: 0.16em;
  color: #f3e6c4;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.6);
}

.portal-hero__subtitle {
  color: #ece1c7;
  font-family: var(--portal-font-serif);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  margin-bottom: 2.2rem;
  letter-spacing: 0.22em;
}

.portal-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

/* ===== Landing full-bleed composition (mir.cn-style layout) ===== */
.portal-hero--landing {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 3rem;
  background: #000;
}

.portal-hero--landing .portal-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portal-hero__enter {
  position: static;
  display: inline-block;
  margin: 0 0 1.35rem;
  padding: 0.45rem 1.35rem;
  border: 1px solid rgba(216, 189, 138, 0.5);
  background: linear-gradient(180deg, rgba(182, 145, 87, 0.9), rgba(116, 74, 32, 0.9));
  color: #fff3d1;
  font-family: var(--portal-font-serif);
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.portal-hero__enter::before {
  content: "\2756";
  margin-right: 0.5rem;
  color: var(--portal-gold);
}

.portal-hero__enter:hover {
  background: rgba(140, 24, 18, 0.6);
  color: #fff;
}

.portal-hero__brand {
  position: absolute;
  top: 1.2rem;
  left: 8rem;
  z-index: 3;
}

.portal-hero__brand-mark {
  font-family: var(--portal-font-serif);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--portal-gold-bright);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}

.portal-hero--landing .portal-hero__title {
  font-size: clamp(3rem, 8vw, 5.8rem);
  letter-spacing: 0.12em;
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #d6c391;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
}

.portal-hero--landing .portal-hero__subtitle {
  display: none;
}

.portal-hero__entrybar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: center;
  gap: 0.75rem 0.85rem;
  width: 100%;
  max-width: 400px;
  margin: 0 auto 0;
}

.hero-entry {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  justify-content: flex-start;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(216, 189, 138, 0.35);
  background: rgba(220, 220, 220, 0.88);
  color: var(--portal-gold-bright);
  font-family: var(--portal-font-serif);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hero-entry__label {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-entry:hover {
  background: rgba(20, 15, 10, 0.7);
  border-color: var(--portal-gold-bright);
  color: #f3e6c4;
}

.hero-entry--primary {
  background: rgba(140, 24, 18, 0.92);
  border-color: rgba(179, 34, 26, 0.9);
  color: #fff8e7;
}

.hero-entry--primary .hero-entry__label {
  color: #fff8e7;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.hero-entry--gold {
  background: linear-gradient(180deg, rgba(190, 151, 86, 0.92), rgba(112, 78, 34, 0.92));
  color: #fff8e7;
}

.hero-entry--gold .hero-entry__label {
  color: #fff8e7;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.hero-entry--light {
  background: rgba(236, 232, 224, 0.95);
  border-color: rgba(200, 190, 170, 0.85);
  color: #2a2118;
}

.hero-entry--light .hero-entry__label {
  color: #2a2118;
  font-weight: 600;
}

.hero-entry--primary:hover {
  background: var(--portal-crimson-bright);
  border-color: var(--portal-crimson-bright);
  color: #fff;
}

.hero-entry__ico {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  background-color: rgba(0, 0, 0, 0.18);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.05rem;
  opacity: 0.95;
}

.hero-entry__ico--pc {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3e6c4' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='11' rx='1'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E");
}

.hero-entry__ico--mobile {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3e6c4' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='7' y='3' width='10' height='18' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E");
}

.hero-entry__ico--partner {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff3d1' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Ccircle cx='16' cy='10' r='2.5'/%3E%3Cpath d='M4 20c0-3 2.5-5 5-5s5 2 5 5M13 20c0-2 1.5-3.5 3.5-3.5S20 18 20 20'/%3E%3C/svg%3E");
}

.hero-entry__ico--community {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2330271d' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-1.1 4.2 8.5 8.5 0 0 1-7.4 4.3 8.4 8.4 0 0 1-4.2-1.1L3 21l1.1-5.3A8.4 8.4 0 0 1 3 11.5 8.5 8.5 0 0 1 11.5 3 8.4 8.4 0 0 1 16 4.1L21 3l-1.1 5.3A8.4 8.4 0 0 1 21 11.5z'/%3E%3C/svg%3E");
  background-color: rgba(255, 255, 255, 0.55);
  border-color: rgba(48, 39, 29, 0.25);
}

/* 欢迎页按钮下方游戏展示图 */
.portal-landing-showcase {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.65rem;
  margin: 1.35rem auto 0;
  max-width: 420px;
  padding: 0 0.25rem;
}

.portal-landing-showcase__item {
  flex: 1 1 0;
  min-width: 0;
  height: 88px;
  border: 1px solid rgba(216, 189, 138, 0.45);
  border-radius: 4px;
  background-size: cover;
  background-position: center top;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  opacity: 0.92;
}

@media (min-width: 992px) {
  .portal-hero__entrybar {
    max-width: 440px;
    gap: 0.85rem 1rem;
  }

  .hero-entry {
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
  }

  .portal-landing-showcase {
    max-width: 480px;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  .portal-landing-showcase__item {
    height: 104px;
  }
}

.portal-hero__sublinks {
  margin-top: 1.2rem;
  color: #cdbb95;
  font-family: var(--portal-font-serif);
  letter-spacing: 0.1em;
}

.portal-hero__sublinks a {
  color: var(--portal-gold-bright);
  text-decoration: none;
  margin: 0 0.4rem;
}

.portal-hero__sublinks a:hover { color: #f3e6c4; }

.portal-cta-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: 1080px;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem 3.5rem;
}

.portal-cta-tile {
  background: rgba(233, 227, 215, 0.92);
  border: 1px solid var(--portal-border-gold);
  border-top: 3px solid var(--portal-gold);
  padding: 1.6rem 1.4rem;
  text-align: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.portal-cta-tile + .portal-cta-tile { border-left: none; }

.portal-cta-tile:hover {
  transform: translateY(-3px);
  background: #fff;
}

.portal-cta-tile__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.85rem;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: rgba(163, 139, 109, 0.14);
  border: 1px solid var(--portal-border-gold);
  color: var(--portal-gold-deep);
  font-family: var(--portal-font-serif);
  font-weight: 700;
  font-size: 0.95rem;
}

.portal-cta-tile h3 {
  font-family: var(--portal-font-serif);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  color: var(--portal-ink);
  letter-spacing: 0.06em;
}

.portal-cta-tile p {
  color: var(--portal-ink-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ===== Showcase (角色展示/世界观/编年史/战争与冒险) ===== */
.showcase {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.showcase__nav {
  list-style: none;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.5rem 0;
  border-left: 1px solid var(--portal-border);
  margin: 0;
}

.showcase__navlink {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0 0.7rem 1.4rem;
  border: none;
  background: transparent;
  color: var(--portal-ink-muted);
  font-family: var(--portal-font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.showcase__navlink::before {
  content: "\25C6";
  position: absolute;
  left: -0.46rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  color: var(--portal-border);
  background: #efe9dd;
  padding: 2px 0;
}

.showcase__navlink:hover { color: var(--portal-ink); }

.showcase__navlink.active {
  color: var(--portal-crimson);
  font-weight: 700;
}

.showcase__navlink.active::before { color: var(--portal-crimson); }

.showcase__stage { position: relative; }

.showcase__pane {
  position: relative;
  min-height: 480px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--portal-border-gold);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.showcase__pane--dark {
  background:
    radial-gradient(circle at 30% 0%, rgba(140, 24, 18, 0.18), transparent 24rem),
    linear-gradient(180deg, #1c150d, #120d07);
}

.showcase__pane-inner {
  position: relative;
  z-index: 1;
  padding: 2.4rem 2.6rem;
  color: #f3e6c4;
}

.showcase__pane-inner--center {
  margin-top: auto;
  text-align: center;
}

.showcase__pane-inner--top { text-align: center; }

.showcase__pane h2 {
  font-family: var(--portal-font-serif);
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
  color: #f3e6c4;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.showcase__pane--dark h2 { color: var(--portal-gold-bright); }

.showcase__lead {
  font-family: var(--portal-font-serif);
  letter-spacing: 0.1em;
  color: #ece1c7;
}

.showcase__roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 1.2rem 0 0.5rem;
}

.showcase__role {
  display: block;
  min-width: 150px;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(216, 189, 138, 0.5);
  background: rgba(20, 15, 10, 0.5);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

a.showcase__role:hover {
  background: rgba(140, 24, 18, 0.55);
  border-color: var(--portal-gold-bright);
  transform: translateY(-3px);
}

.showcase__role h3 {
  font-family: var(--portal-font-serif);
  font-size: 1.3rem;
  letter-spacing: 0.14em;
  margin: 0 0 0.25rem;
  color: var(--portal-gold-bright);
}

.showcase__role p { margin: 0; font-size: 0.85rem; color: #d8cba9; }

.showcase__zones {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 0.5rem 1rem;
  padding: 1rem 2rem 1.6rem;
  background: linear-gradient(180deg, transparent, rgba(20, 15, 10, 0.7));
}

.showcase__zones span {
  font-family: var(--portal-font-serif);
  letter-spacing: 0.16em;
  color: #ece1c7;
  position: relative;
  padding-top: 1rem;
}

.showcase__zones span::before {
  content: "\25C6";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  color: var(--portal-gold);
}

.showcase__timeline {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  border-left: 2px solid rgba(216, 189, 138, 0.4);
}

.showcase__timeline li {
  position: relative;
  padding: 0 0 1.2rem 1.4rem;
  color: #d8cba9;
  line-height: 1.8;
}

.showcase__timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  background: var(--portal-crimson);
  transform: rotate(45deg);
}

.showcase__timeline span {
  display: block;
  font-family: var(--portal-font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--portal-gold-bright);
  margin-bottom: 0.2rem;
}

.showcase__war {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.2rem;
}

.showcase__war article {
  border: 1px solid rgba(216, 189, 138, 0.4);
  background: rgba(20, 15, 10, 0.45);
  padding: 1.2rem;
}

.showcase__war h3 {
  font-family: var(--portal-font-serif);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: var(--portal-gold-bright);
  margin-bottom: 0.4rem;
}

.showcase__war p { margin: 0; font-size: 0.88rem; color: #d8cba9; }

/* role sub-tabs (职业/时装/技能/命盘) */
#sc-role { position: relative; padding: 0; }

.showcase__rolebg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

.showcase__rolebg.is-active { opacity: 1; }

.showcase__subnav {
  position: relative;
  z-index: 2;
  list-style: none;
  gap: 1.4rem;
  justify-content: center;
  padding: 1rem 1rem 0;
  margin: 0;
}

.showcase__sublink {
  border: none;
  background: transparent;
  color: #d8cba9;
  font-family: var(--portal-font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  padding: 0.4rem 0.2rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.showcase__sublink:hover { color: #f3e6c4; }

.showcase__sublink.active {
  color: var(--portal-gold-bright);
  border-bottom-color: var(--portal-crimson);
}

.showcase__substage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
}

.showcase__substage > .tab-pane { width: 100%; }
.showcase__substage > .tab-pane.active { display: flex; flex-direction: column; }

/* world zones */
.showcase__zonenav {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: auto 0 0;
  padding: 0.8rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 0.6rem;
  background: linear-gradient(180deg, transparent, rgba(20, 15, 10, 0.55));
}

.showcase__zonelink {
  position: relative;
  border: none;
  background: transparent;
  color: #ece1c7;
  font-family: var(--portal-font-serif);
  font-size: 1.02rem;
  letter-spacing: 0.16em;
  padding: 0.8rem 1rem 0.4rem;
  cursor: pointer;
}

.showcase__zonelink::before {
  content: "\25C6";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  color: rgba(216, 189, 138, 0.5);
}

.showcase__zonelink:hover { color: #fff; }

.showcase__zonelink.active { color: var(--portal-gold-bright); }
.showcase__zonelink.active::before { color: var(--portal-crimson); }

.showcase__zonecard-wrap {
  position: relative;
  z-index: 1;
  padding: 0 1rem 1.4rem;
}

.showcase__zonecard {
  max-width: 560px;
  margin: 0 auto;
  background: rgba(20, 15, 10, 0.66);
  border: 1px solid rgba(216, 189, 138, 0.4);
  border-top: 2px solid var(--portal-crimson);
  padding: 1.2rem 1.4rem;
}

.showcase__zonecard h3 {
  font-family: var(--portal-font-serif);
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  color: var(--portal-gold-bright);
  margin-bottom: 0.5rem;
}

.showcase__zonecard h3 small {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: #c0a673;
  margin-bottom: 0.2rem;
}

.showcase__zonecard p {
  margin: 0;
  color: #e3d7bd;
  line-height: 1.9;
  font-size: 0.92rem;
}

/* chronicle chapters */
.showcase__chapters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
  margin-top: 1.2rem;
}

.showcase__chapter {
  border-left: 2px solid rgba(216, 189, 138, 0.4);
  padding: 0.2rem 0 0.4rem 1.1rem;
}

.showcase__chapter-no {
  font-family: var(--portal-font-serif);
  letter-spacing: 0.12em;
  color: var(--portal-crimson-bright);
  font-size: 0.92rem;
}

.showcase__chapter h3 {
  font-family: var(--portal-font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: var(--portal-gold-bright);
  margin: 0.25rem 0 0.45rem;
}

.showcase__chapter p {
  margin: 0;
  color: #d8cba9;
  line-height: 1.85;
  font-size: 0.9rem;
}

.showcase__en {
  font-family: var(--portal-font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: #c0a673;
  margin-left: 0.8rem;
}

@media (max-width: 767.98px) {
  .showcase__chapters { grid-template-columns: 1fr; }
  .showcase__subnav { gap: 0.8rem; flex-wrap: wrap; }
  .showcase { grid-template-columns: 1fr; }
  .showcase__nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-left: none;
    border-bottom: 1px solid var(--portal-border);
    padding: 0.5rem 0;
  }
  .showcase__navlink { width: auto; padding: 0.5rem 0.9rem; }
  .showcase__navlink::before { display: none; }
  .showcase__war { grid-template-columns: 1fr; }
}

/* ===== Section title ===== */
.portal-section-title {
  font-family: var(--portal-font-serif);
  font-size: 1.7rem;
  color: var(--portal-ink);
  margin-bottom: 1.4rem;
  letter-spacing: 0.12em;
  text-align: center;
  position: relative;
  padding-bottom: 0.85rem;
}

.portal-section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: var(--portal-gold);
}

/* ===== Cinematic full-screen hero (main page top, mir.cn-style) ===== */
.portal-cinema {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: -6.5rem;
  margin-bottom: 2.5rem;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.portal-cinema__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 1.5rem;
  margin-top: 3rem;
}

.portal-cinema__eyebrow {
  display: inline-block;
  padding: 0.3rem 1.4rem;
  border: 1px solid rgba(216, 189, 138, 0.55);
  background: rgba(20, 15, 10, 0.35);
  color: var(--portal-gold-bright);
  font-family: var(--portal-font-serif);
  letter-spacing: 0.34em;
  font-size: 0.95rem;
  margin-bottom: 1.6rem;
}

.portal-cinema__title {
  font-family: var(--portal-font-serif);
  font-weight: 700;
  font-size: clamp(2.8rem, 8vw, 6rem);
  letter-spacing: 0.14em;
  line-height: 1.12;
  margin: 0 0 1rem;
  color: #e7d29a;
  background: linear-gradient(180deg, #f6e6b8 0%, #d8b873 55%, #a9824a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 6px 26px rgba(0, 0, 0, 0.7);
}

.portal-cinema__en {
  color: rgba(216, 189, 138, 0.62);
  letter-spacing: 0.62em;
  font-size: clamp(0.7rem, 1.4vw, 1rem);
  text-transform: uppercase;
  margin: 0 0 1.4rem;
  padding-left: 0.62em;
}

.portal-cinema__tagline {
  color: #ece1c7;
  font-family: var(--portal-font-serif);
  letter-spacing: 0.18em;
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  margin: 0;
}

.portal-cinema__scroll {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(238, 225, 199, 0.85);
  font-family: var(--portal-font-serif);
  letter-spacing: 0.28em;
  font-size: 0.82rem;
  text-decoration: none;
  animation: cinemaBob 2s ease-in-out infinite;
}

.portal-cinema__scroll:hover { color: #f6e6b8; }

.portal-cinema__chev {
  width: 16px;
  height: 16px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

@keyframes cinemaBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(7px); }
}

/* ===== Main hero banner (inner pages) ===== */
.portal-main-hero {
  background: var(--portal-paper);
  border: 1px solid var(--portal-border);
  border-top: 3px solid var(--portal-gold);
  border-radius: 0;
  padding: 2.6rem 2.4rem;
  margin-bottom: 2rem;
  text-align: center;
}

.portal-main-hero h1 {
  font-family: var(--portal-font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--portal-ink);
  margin-bottom: 0.6rem;
  letter-spacing: 0.12em;
}

/* banner variant: cover image + dark overlay + light text */
.portal-main-hero--banner {
  position: relative;
  border: 1px solid var(--portal-border-gold);
  border-top: 3px solid var(--portal-gold);
  background-size: cover;
  background-position: center;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.2rem 2.4rem;
  overflow: hidden;
  color: #f3e6c4;
}

.portal-main-hero--banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 15, 10, 0.42) 0%, rgba(20, 15, 10, 0.72) 100%);
  pointer-events: none;
  z-index: 0;
}

.portal-main-hero--banner > * {
  position: relative;
  z-index: 1;
}

.portal-main-hero--banner h1 {
  color: #f6ead2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}

.portal-main-hero--banner .muted {
  color: #ece1c7 !important;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
}

.portal-main-hero--banner .portal-hero__eyebrow {
  border-color: rgba(216, 189, 138, 0.65);
  background: rgba(20, 15, 10, 0.55);
  color: #f0dca8;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

/* ===== mir.cn-style list/detail pages ===== */
.mir-list-hero {
  min-height: 260px;
  margin-bottom: 2rem;
  border: 1px solid var(--portal-border-gold);
  border-top: 3px solid var(--portal-gold);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #f3e6c4;
  padding: 2.5rem 1.5rem;
}

.mir-list-hero h1 {
  font-family: var(--portal-font-serif);
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.16em;
  margin: 0 0 0.6rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
}

.mir-list-hero p {
  margin: 0;
  font-family: var(--portal-font-serif);
  letter-spacing: 0.14em;
  color: #ece1c7;
}

.mir-list-page {
  background: rgba(249, 249, 249, 0.88);
  border: 1px solid var(--portal-border);
  border-top: 3px solid var(--portal-gold);
  padding: 2rem 2.2rem;
  margin-bottom: 2rem;
}

.mir-list-title {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  align-items: baseline;
  font-family: var(--portal-font-serif);
  letter-spacing: 0.12em;
  margin-bottom: 1.6rem;
  color: var(--portal-ink);
}

.mir-list-title span {
  font-size: 1.6rem;
}

.mir-list-title strong {
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--portal-crimson);
}

.mir-article-list {
  max-width: 980px;
  margin: 0 auto;
}

.mir-article-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.4rem;
  border-bottom: 1px solid rgba(71, 57, 40, 0.14);
  text-decoration: none;
  color: var(--portal-ink);
  transition: background 0.2s ease;
}

.mir-article-main {
  min-width: 0;
}

.mir-article-meta-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-top: 0.35rem;
}

.mir-article-row:hover {
  color: var(--portal-crimson);
  background: rgba(163, 139, 109, 0.08);
}

.mir-article-thumb {
  width: 96px;
  height: 58px;
  object-fit: cover;
  border: 1px solid var(--portal-border);
  background: #ece6da;
  display: block;
}

.mir-ic {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.3rem;
  vertical-align: -0.16rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.6;
}

.mir-ic--user {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238b7355'%3E%3Cpath d='M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 1.5c-3 0-6 1.5-6 4V15h12v-1.5c0-2.5-3-4-6-4z'/%3E%3C/svg%3E");
}

.mir-ic--eye {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238b7355'%3E%3Cpath d='M8 3C4 3 1.3 6 .5 8c.8 2 3.5 5 7.5 5s6.7-3 7.5-5C14.7 6 12 3 8 3zm0 8a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/%3E%3C/svg%3E");
}

.mir-article-title {
  font-family: var(--portal-font-serif);
  font-size: 1.08rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mir-article-meta {
  color: var(--portal-ink-muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.mir-pagination {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.mir-pagination a {
  color: var(--portal-ink-muted);
  text-decoration: none;
  font-family: var(--portal-font-serif);
}

.mir-pagination a.active,
.mir-pagination a:hover {
  color: var(--portal-crimson);
}

.mir-tabbar {
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--portal-border);
}

.mir-tabbar a {
  position: relative;
  padding: 0.75rem 0.2rem;
  font-family: var(--portal-font-serif);
  color: var(--portal-ink-muted);
  text-decoration: none;
  letter-spacing: 0.1em;
}

.mir-tabbar a.active,
.mir-tabbar a:hover {
  color: var(--portal-crimson);
}

.mir-tabbar a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--portal-crimson);
}

.mir-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.mir-activity-card {
  display: block;
  padding: 1.35rem;
  border: 1px solid var(--portal-border);
  border-top: 3px solid var(--portal-gold);
  background: #fff;
  color: var(--portal-ink);
  text-decoration: none;
}

.mir-activity-card:hover {
  color: var(--portal-crimson);
  box-shadow: 0 12px 30px rgba(71, 57, 40, 0.12);
}

.mir-activity-card__tag,
.mir-activity-card time {
  color: var(--portal-ink-muted);
  font-size: 0.85rem;
}

.mir-activity-card h3 {
  font-family: var(--portal-font-serif);
  margin: 0.45rem 0;
  letter-spacing: 0.08em;
}

/* ===== Partner pages ===== */
.partner-landing {
  min-height: 560px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--portal-border-gold);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  margin-bottom: 2rem;
  color: #f3e6c4;
}

.partner-landing__content {
  max-width: 760px;
}

.partner-landing__eyebrow {
  font-family: var(--portal-font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.36em;
  color: var(--portal-gold-bright);
}

.partner-landing h1 {
  font-family: var(--portal-font-serif);
  font-size: clamp(2.8rem, 7vw, 5rem);
  letter-spacing: 0.16em;
  margin: 0.7rem 0;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.65);
}

.partner-landing p {
  color: #ece1c7;
  font-family: var(--portal-font-serif);
  letter-spacing: 0.08em;
  margin-bottom: 1.4rem;
}

.partner-landing__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.partner-benefits {
  background: rgba(249, 249, 249, 0.9);
  border: 1px solid var(--portal-border);
  border-top: 3px solid var(--portal-gold);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.partner-benefits h2 {
  font-family: var(--portal-font-serif);
  letter-spacing: 0.12em;
  color: var(--portal-ink);
}

.partner-benefits__lead {
  color: var(--portal-ink-muted);
  margin-bottom: 1.4rem;
}

.partner-benefits__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.partner-benefits__grid article {
  background: #fff;
  border: 1px solid var(--portal-border);
  border-top: 3px solid var(--portal-gold);
  padding: 1.2rem;
}

.partner-benefits__grid strong {
  display: block;
  font-family: var(--portal-font-serif);
  font-size: 1.12rem;
  letter-spacing: 0.1em;
  color: var(--portal-crimson);
  margin-bottom: 0.35rem;
}

.partner-benefits__grid span {
  color: var(--portal-ink-muted);
  font-size: 0.9rem;
}

.partner-ecology {
  max-width: 1080px;
  margin: 0 auto 2rem;
}

.partner-ecology__header {
  min-height: 300px;
  background-size: cover;
  background-position: center;
  color: #f3e6c4;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--portal-border-gold);
  border-top: 3px solid var(--portal-gold);
  padding: 2rem;
  margin-bottom: 1.4rem;
}

.partner-ecology__header span {
  color: var(--portal-gold-bright);
  letter-spacing: 0.32em;
  font-size: 0.82rem;
}

.partner-ecology__header h1 {
  font-family: var(--portal-font-serif);
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: 0.16em;
  margin: 0.6rem 0;
}

.partner-ecology__section {
  background: rgba(249, 249, 249, 0.9);
  border: 1px solid var(--portal-border);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1rem;
  color: var(--portal-ink-soft);
  line-height: 1.9;
}

.partner-ecology__section h2 {
  font-family: var(--portal-font-serif);
  color: var(--portal-ink);
  letter-spacing: 0.1em;
  margin-bottom: 0.85rem;
}

.partner-rule-list {
  margin: 0;
  padding-left: 1.2rem;
}

.partner-rule-list li {
  margin-bottom: 0.4rem;
}

.partner-benefit-table {
  overflow-x: auto;
}

.partner-benefit-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.partner-benefit-table th,
.partner-benefit-table td {
  border: 1px solid var(--portal-border);
  padding: 0.75rem 0.85rem;
  text-align: center;
}

.partner-benefit-table th {
  background: rgba(163, 139, 109, 0.14);
  color: var(--portal-ink);
  font-family: var(--portal-font-serif);
  letter-spacing: 0.08em;
}

.partner-ecology__notice {
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--portal-crimson);
  background: rgba(140, 24, 18, 0.08);
  color: var(--portal-ink);
}

/* ===== Wiki role detail page ===== */
.wiki-role-page {
  position: relative;
  min-height: calc(100svh - 82px);
  margin: -0.5rem calc(50% - 50vw) -3rem;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  overflow: hidden;
}

.wiki-role-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 42%, rgba(255, 255, 255, 0.1) 68%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
}

.wiki-role-back {
  position: absolute;
  z-index: 2;
  top: 3rem;
  left: 6rem;
  color: #252525;
  text-decoration: none;
  font-family: var(--portal-font-serif);
  letter-spacing: 0.12em;
}

.wiki-role-nav {
  position: absolute;
  z-index: 2;
  left: 5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  border-left: 1px solid #222;
  padding: 2rem 0 2rem 1.2rem;
}

.wiki-role-nav a {
  position: relative;
  color: #222;
  text-decoration: none;
  font-family: var(--portal-font-serif);
  letter-spacing: 0.12em;
}

.wiki-role-nav a::before {
  content: "";
  position: absolute;
  left: -1.55rem;
  top: 50%;
  width: 9px;
  height: 9px;
  transform: translateY(-50%) rotate(45deg);
  background: #111;
}

.wiki-role-nav a.active::before {
  background: var(--portal-crimson);
  outline: 1px solid #fff;
  outline-offset: 2px;
}

.wiki-role-copy {
  position: relative;
  z-index: 2;
  width: min(480px, 46vw);
  margin-left: 19%;
  padding-top: 14vh;
  color: #333;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.wiki-role-lead {
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.wiki-role-copy h1 {
  font-family: var(--portal-font-serif);
  font-size: clamp(4rem, 8vw, 6.6rem);
  line-height: 1;
  letter-spacing: 0.06em;
  margin: 0.1rem 0 1rem;
}

.wiki-role-line {
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
  position: relative;
  margin-bottom: 1.5rem;
}

.wiki-role-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%) rotate(45deg);
  background: currentColor;
}

.wiki-role-copy p {
  line-height: 1.9;
  font-size: 1.02rem;
}

.wiki-role-page--blue .wiki-role-copy { color: #27345a; }
.wiki-role-page--green .wiki-role-copy { color: #2e5d5a; }
.wiki-role-page--purple .wiki-role-copy { color: #593551; }

/* ===== Wiki guide post (攻略帖子正文) ===== */
/* ===== Wiki detail (mir.cn/wiki detail layout) ===== */
.wiki-detail {
  max-width: 980px;
  margin: 0 auto 2.5rem;
}

.wiki-detail__cover {
  width: 100%;
  margin-bottom: 1.5rem;
  border: 1px solid var(--portal-border);
  overflow: hidden;
}

.wiki-detail__cover img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.wiki-detail__header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(71, 57, 40, 0.14);
}

.wiki-detail__header h1 {
  font-family: var(--portal-font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--portal-ink);
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

.wiki-detail__meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--portal-ink-muted);
  font-size: 0.9rem;
}

.wiki-detail__views {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.wiki-detail__body,
.rich-text-content {
  color: var(--portal-ink);
  font-size: 1rem;
  line-height: 1.75;
}

.rich-text-content h2 {
  font-family: var(--portal-font-serif);
  font-size: 1.35rem;
  margin: 2rem 0 1rem;
  letter-spacing: 0.04em;
}

.rich-text-content h3 {
  font-family: var(--portal-font-serif);
  font-size: 1.1rem;
  margin: 1.25rem 0 0.65rem;
}

.rich-text-content p {
  margin: 0 0 0.85rem;
}

.rich-text-content ul,
.rich-text-content ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.rich-text-content li {
  margin-bottom: 0.35rem;
}

.rich-text-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.75rem auto;
  border: 1px solid var(--portal-border);
}

.rich-text-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.rich-text-content th,
.rich-text-content td {
  border: 1px solid var(--portal-border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.wiki-detail__back {
  margin-top: 2rem;
}

.wiki-post {
  max-width: 920px;
  margin: 0 auto 2rem;
}

.wiki-post__header {
  min-height: 240px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--portal-border-gold);
  border-top: 3px solid var(--portal-gold);
  color: #f3e6c4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.2rem 2.4rem;
  margin-bottom: 1.5rem;
}

.wiki-post__tag {
  align-self: flex-start;
  font-family: var(--portal-font-serif);
  letter-spacing: 0.2em;
  color: var(--portal-gold-bright);
  border: 1px solid rgba(216, 189, 138, 0.6);
  padding: 0.2rem 0.9rem;
  margin-bottom: 0.8rem;
}

.wiki-post__header h1 {
  font-family: var(--portal-font-serif);
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  letter-spacing: 0.06em;
  margin: 0 0 0.7rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.wiki-post__meta {
  display: flex;
  gap: 0.55rem;
  color: #ece1c7;
  font-size: 0.9rem;
}

.wiki-post__body {
  background: #fff;
  border: 1px solid var(--portal-border);
  border-top: 3px solid var(--portal-gold);
  padding: 1.8rem 2rem;
  color: var(--portal-ink-soft);
  line-height: 1.95;
  margin-bottom: 1.4rem;
}

.wiki-post__body h2 {
  font-family: var(--portal-font-serif);
  color: var(--portal-ink);
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  margin: 1.4rem 0 0.7rem;
  padding-left: 0.7rem;
  border-left: 3px solid var(--portal-crimson);
}

.wiki-post__body p,
.wiki-post__body li { font-size: 1rem; }

.wiki-post__body ol { padding-left: 1.3rem; }

.portal-main-hero:not(.portal-main-hero--banner) .portal-hero__eyebrow + h1,
.portal-main-hero:not(.portal-main-hero--banner) .portal-hero__eyebrow {
  color: var(--portal-ink);
}

.portal-main-hero:not(.portal-main-hero--banner) .portal-hero__eyebrow {
  border-color: var(--portal-border-gold);
  background: rgba(163, 139, 109, 0.1);
  color: var(--portal-gold-deep);
}

/* ===== Server zones (区服) ===== */
.server-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.server-tile {
  position: relative;
  border: 1px solid var(--portal-border);
  border-top: 3px solid var(--portal-gold);
  border-radius: 0;
  padding: 1.55rem 1rem 1.3rem;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.server-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 15, 10, 0.35) 0%, rgba(20, 15, 10, 0.62) 55%, rgba(20, 15, 10, 0.85) 100%);
  z-index: 0;
}

.server-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(71, 57, 40, 0.22);
}

.server-tile__name {
  position: relative;
  z-index: 1;
  font-family: var(--portal-font-serif);
  font-size: 1.25rem;
  color: #f6ead2;
  margin-bottom: 0.4rem;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.server-tile__desc {
  position: relative;
  z-index: 1;
  color: rgba(246, 234, 210, 0.85);
  font-size: 0.85rem;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

/* ===== Feature cards ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.feature-card {
  position: relative;
  border: 1px solid var(--portal-border);
  border-top: 3px solid var(--portal-gold);
  border-radius: 0;
  padding: 1.6rem;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 15, 10, 0.25) 0%, rgba(20, 15, 10, 0.6) 50%, rgba(20, 15, 10, 0.88) 100%);
  z-index: 0;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(71, 57, 40, 0.24);
}

.feature-card__label {
  position: relative;
  z-index: 1;
  color: var(--portal-gold);
  font-family: var(--portal-font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.feature-card h3 {
  position: relative;
  z-index: 1;
  font-family: var(--portal-font-serif);
  font-size: 1.35rem;
  color: #f6ead2;
  margin-bottom: 0.65rem;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.feature-card p {
  position: relative;
  z-index: 1;
  color: rgba(246, 234, 210, 0.88);
  margin: 0;
  font-size: 0.95rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

/* ===== News panel ===== */
.news-panel {
  background: var(--portal-paper);
  border: 1px solid var(--portal-border);
  border-radius: 0;
  padding: 1.6rem 1.8rem;
  margin-bottom: 2rem;
}

.news-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--portal-border);
}

.news-row:last-child { border-bottom: none; padding-bottom: 0; }

.news-row__meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.news-category {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(140, 24, 18, 0.1);
  color: var(--portal-crimson);
}

.news-category--维护 {
  background: rgba(163, 139, 109, 0.16);
  color: var(--portal-gold-deep);
}

.news-category--活动 {
  background: rgba(140, 24, 18, 0.1);
  color: var(--portal-crimson);
}

.news-row__date {
  color: var(--portal-ink-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.news-row__title {
  color: var(--portal-ink);
  text-decoration: none;
  font-weight: 600;
}

.news-row__title:hover { color: var(--portal-crimson); }

.news-row__summary {
  color: var(--portal-ink-muted);
  font-size: 0.9rem;
  margin: 0.35rem 0 0;
}

/* ===== CTA strip ===== */
.cta-strip {
  background: var(--portal-parchment);
  border: 1px solid var(--portal-border-gold);
  border-left: 3px solid var(--portal-crimson);
  border-radius: 0;
  padding: 1.75rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-strip h2 {
  font-family: var(--portal-font-serif);
  font-size: 1.5rem;
  color: var(--portal-ink);
  margin: 0 0 0.35rem;
  letter-spacing: 0.08em;
}

.cta-strip p { margin: 0; color: var(--portal-ink-soft); }

.cta-strip__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* ===== Cards / panels (kept class name portal-card-dark for compat) ===== */
.portal-card-dark {
  background: #fff;
  border: 1px solid var(--portal-border);
  border-top: 3px solid var(--portal-gold);
  border-radius: 0;
  padding: 1.8rem;
  color: var(--portal-ink);
}

.portal-card-dark .form-label {
  color: var(--portal-ink-soft);
  font-family: var(--portal-font-serif);
  letter-spacing: 0.04em;
}

.portal-card-dark .form-control,
.portal-card-dark .form-select {
  background: var(--portal-paper-2);
  border-color: var(--portal-border);
  border-radius: 0;
  color: var(--portal-ink);
}

.portal-card-dark .form-control:focus,
.portal-card-dark .form-select:focus {
  background: #fff;
  border-color: var(--portal-gold);
  color: var(--portal-ink);
  box-shadow: 0 0 0 0.2rem rgba(163, 139, 109, 0.18);
}

.portal-card-dark .text-danger { color: var(--portal-red) !important; }

.portal-card-dark .alert-danger {
  background: rgba(211, 47, 47, 0.08);
  border-color: rgba(211, 47, 47, 0.3);
  color: var(--portal-crimson);
  border-radius: 0;
}

.portal-card-dark .alert-success {
  background: #e8f5e9;
  border-color: rgba(45, 80, 22, 0.3);
  color: #2d5016;
  border-radius: 0;
}

/* ===== Auth split ===== */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.auth-split__brand {
  background:
    linear-gradient(180deg, rgba(20, 15, 10, 0.55), rgba(20, 15, 10, 0.82)),
    url("/img/portal-hero.png");
  background-size: cover;
  background-position: center;
  border: 1px solid var(--portal-border-gold);
  border-radius: 0;
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-split__brand h1 {
  font-family: var(--portal-font-serif);
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--portal-gold-bright);
  letter-spacing: 0.1em;
}

.auth-split__brand p {
  color: #ece1c7;
  margin: 0;
  line-height: 1.8;
}

/* ===== News detail ===== */
.news-detail-header { margin-bottom: 1.5rem; }

.news-detail-header h1 {
  font-family: var(--portal-font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--portal-ink);
  margin: 0.75rem 0;
  letter-spacing: 0.06em;
}

.news-detail-content {
  color: var(--portal-ink-soft);
  line-height: 1.9;
}

.news-detail-content p { margin-bottom: 1rem; }

/* ===== Footer ===== */
.portal-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 2.2rem 1.25rem;
  border-top: 1px solid rgba(163, 139, 109, 0.4);
  background: var(--portal-header-bg);
  text-align: center;
}

.portal-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  margin-bottom: 1rem;
}

.portal-footer__nav a {
  color: var(--portal-gold-bright);
  font-family: var(--portal-font-serif);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}

.portal-footer__nav a:hover { color: #f3e6c4; }

.portal-footer__health {
  color: #b6a585;
  font-size: 0.82rem;
  line-height: 1.7;
  max-width: 760px;
  margin: 0 auto 0.75rem;
}

.portal-footer__legal {
  color: #8a7a5c;
  font-size: 0.78rem;
}

/* ===== Reveal animation ===== */
/* Hide for the reveal animation only when JS is running (html.portal-js) */
.portal-js .portal-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.portal-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Bootstrap component overrides (light theme) ===== */
.portal-body .hero-card,
.portal-body .portal-card {
  background: #fff;
  border-color: var(--portal-border);
  color: var(--portal-ink);
}

.portal-body .card {
  background: var(--portal-paper);
  border: 1px solid var(--portal-border);
  border-top: 3px solid var(--portal-gold);
  border-radius: 0;
  color: var(--portal-ink);
}

.portal-body .card .card-header,
.portal-body .card .card-footer {
  background: var(--portal-paper-2);
  border-color: var(--portal-border);
  color: var(--portal-ink);
}

.portal-body .card .text-muted { color: var(--portal-ink-muted) !important; }

.portal-body .table {
  --bs-table-color: var(--portal-ink);
  --bs-table-striped-color: var(--portal-ink);
  --bs-table-striped-bg: rgba(163, 139, 109, 0.08);
  --bs-table-border-color: var(--portal-border);
  color: var(--portal-ink);
}

.partner-module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.partner-module-grid .portal-cta-tile h3 {
  font-family: var(--portal-font-serif);
  font-size: 1.1rem;
  color: var(--portal-ink);
  margin-bottom: 0.35rem;
}

.portal-body .muted { color: var(--portal-ink-muted); }

.portal-body .status-badge {
  background: rgba(163, 139, 109, 0.16);
  color: var(--portal-gold-deep);
}

.portal-body .btn-primary {
  background: var(--portal-crimson);
  border: 1px solid var(--portal-crimson);
  color: #f3e6c4;
  border-radius: 0;
  font-family: var(--portal-font-serif);
  font-weight: 600;
}

.portal-body .btn-primary:hover {
  background: var(--portal-crimson-bright);
  border-color: var(--portal-crimson-bright);
  color: #fff;
}

.portal-body .btn-outline-primary {
  border-color: var(--portal-gold);
  color: var(--portal-gold-deep);
  border-radius: 0;
}

.portal-body .btn-outline-primary:hover {
  background: var(--portal-gold);
  color: #fff;
  border-color: var(--portal-gold);
}

.portal-body .btn-outline-secondary {
  border-color: var(--portal-border);
  color: var(--portal-ink-soft);
  border-radius: 0;
}

.portal-body .dropdown-menu {
  background: #fff;
  border-color: var(--portal-border);
  border-radius: 0;
}

.portal-body .dropdown-item { color: var(--portal-ink); }

.portal-body .dropdown-item:hover {
  background: rgba(163, 139, 109, 0.12);
  color: var(--portal-crimson);
}

.portal-body .text-primary { color: var(--portal-crimson) !important; }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
  .portal-cta-grid,
  .feature-grid { grid-template-columns: 1fr; }
  .server-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partner-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partner-benefits__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mir-activity-grid { grid-template-columns: 1fr; }
  .mir-article-row { grid-template-columns: 72px minmax(0, 1fr); }
  .mir-article-thumb { width: 72px; height: 44px; }
  .auth-split { grid-template-columns: 1fr; }
  .news-row { flex-direction: column; }
  .portal-cta-tile + .portal-cta-tile { border-left: 1px solid var(--portal-border-gold); }
  .wiki-role-copy {
    width: auto;
    margin: 0 1.5rem 0 7rem;
  }

  /* 平板：去掉全宽负边距，避免横向溢出 */
  .portal-cinema {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .wiki-role-page {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 575.98px) {
  .partner-module-grid,
  .partner-benefits__grid,
  .server-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   YJJ 国潮风格（移植自 yjj.yijnjing.com share 模块 twig 样式）
   ===================================================================== */
.yjj-bg {
  background-color: #fdf6e9;
  background-image: url("/img/share-bg.png");
  background-size: cover;
  background-position: top center;
  background-attachment: fixed;
}

.yjj-bg .page-shell { position: relative; }

/* ---- 深棕金大标题区（YJJ share/index hero） ---- */
.yjj-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #402f14 0%, #6e4b1f 55%, #a3792f 100%);
  color: #fff8e7;
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: 0 8px 24px rgba(64, 47, 20, 0.25);
}

.yjj-hero::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 203, 134, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.yjj-hero h1 {
  font-family: var(--portal-font-serif);
  letter-spacing: 0.12em;
  color: #f5cb86;
  margin-bottom: 0.4rem;
}

.yjj-hero .yjj-hero-sub {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #fff8e7;
}

.yjj-hero--green { background: linear-gradient(135deg, #2e7d32 0%, #66bb6a 100%); }
.yjj-hero--rank { background: linear-gradient(135deg, #1b5e20 0%, #ffb300 100%); }

/* ---- 渐变玩法磁贴（YJJ sc-card） ---- */
.yjj-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.yjj-tile {
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 14px;
  padding: 1.3rem 1.4rem;
  color: #fff8e7;
  text-decoration: none;
  min-height: 132px;
  box-shadow: 0 6px 18px rgba(64, 47, 20, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.yjj-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(64, 47, 20, 0.3);
  color: #fff;
}

.yjj-tile::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.yjj-tile .yjj-tile-ico {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}

.yjj-tile h3 {
  font-family: var(--portal-font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: #fff8e7;
  margin-bottom: 0.25rem;
}

.yjj-tile p {
  font-size: 0.82rem;
  margin: 0;
  opacity: 0.85;
  color: #fff8e7;
}

.yjj-tile--sign { background: linear-gradient(135deg, #8b4513 0%, #c68642 100%); }
.yjj-tile--dark { background: linear-gradient(135deg, #402f14 0%, #8b4513 100%); }
.yjj-tile--green { background: linear-gradient(135deg, #4a6043 0%, #7b9970 100%); }
.yjj-tile--blue { background: linear-gradient(135deg, #3e4c6b 0%, #6b7f9e 100%); }
.yjj-tile--forest { background: linear-gradient(135deg, #2e7d32 0%, #66bb6a 100%); }
.yjj-tile--gold { background: linear-gradient(135deg, #b8860b 0%, #e6b422 100%); }
.yjj-tile--amber { background: linear-gradient(135deg, #e65100 0%, #fb8c00 100%); }
.yjj-tile--crimson { background: linear-gradient(135deg, #7f1d1d 0%, #c62828 100%); }
.yjj-tile--royal { background: linear-gradient(135deg, #4a148c 0%, #7b1fa2 100%); }
.yjj-tile--teal { background: linear-gradient(135deg, #00695c 0%, #26a69a 100%); }
.yjj-tile--slate { background: linear-gradient(135deg, #37474f 0%, #607d8b 100%); }
.yjj-tile--prize { background: linear-gradient(135deg, #ffc107 0%, #ff6f00 100%); }

/* ---- 羊皮纸卡片（YJJ white-block / tm-member） ---- */
.yjj-card {
  background: linear-gradient(135deg, #fff8e7 0%, #fbeed4 100%);
  border: 1px solid #e8c995;
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.08);
  color: #5a3310;
}

.yjj-card h2,
.yjj-card h3 {
  color: #5a3310;
  font-family: var(--portal-font-serif);
  letter-spacing: 0.06em;
}

.yjj-card .table { --bs-table-color: #5a3310; color: #5a3310; }
.yjj-card .table th { background: rgba(139, 69, 19, 0.1); color: #5a3310; border-color: #e8c995; }
.yjj-card .table td { border-color: rgba(232, 201, 149, 0.6); }

/* ---- 奖品卡（YJJ tm-rank-prize 金/银/铜） ---- */
.yjj-prize-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

.yjj-prize {
  flex: 1 1 180px;
  min-width: 180px;
  padding: 14px 16px;
  border-radius: 12px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.yjj-prize .yjj-prize-rank { font-size: 0.82rem; opacity: 0.85; }
.yjj-prize .yjj-prize-name { font-size: 1.3rem; font-weight: 700; }
.yjj-prize .yjj-prize-note { font-size: 0.78rem; opacity: 0.85; }
.yjj-prize--1 { background: linear-gradient(135deg, #ffc107 0%, #ff6f00 100%); box-shadow: 0 6px 16px rgba(255, 111, 0, 0.35); }
.yjj-prize--2 { background: linear-gradient(135deg, #90a4ae 0%, #455a64 100%); box-shadow: 0 6px 16px rgba(69, 90, 100, 0.35); }
.yjj-prize--3 { background: linear-gradient(135deg, #a1887f 0%, #5d4037 100%); box-shadow: 0 6px 16px rgba(93, 64, 55, 0.35); }

/* ---- 排行榜（YJJ tm-rank-row / tm-rank-num） ---- */
.yjj-rank-board {
  background: #f1f8e9;
  border: 1px solid #c8e6c9;
  border-radius: 10px;
  overflow: hidden;
}

.yjj-rank-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px dashed #c8e6c9;
}

.yjj-rank-row:last-child { border-bottom: 0; }

.yjj-rank-num {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
}

.yjj-rank-num--1 { background: linear-gradient(135deg, #ffc107, #ff6f00); }
.yjj-rank-num--2 { background: linear-gradient(135deg, #b0bec5, #546e7a); }
.yjj-rank-num--3 { background: linear-gradient(135deg, #bcaaa4, #6d4c41); }
.yjj-rank-num--x { background: #e8f5e9; color: #2e7d32; }
.yjj-rank-amt { font-weight: 700; color: #1b5e20; font-size: 1.05rem; margin-left: auto; }

/* ---- 标签（YJJ tm-tag） ---- */
.yjj-tag { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 0.76rem; font-weight: 600; }
.yjj-tag--orange { background: #fff3e0; color: #e65100; }
.yjj-tag--green { background: #e8f5e9; color: #2e7d32; }
.yjj-tag--gold { background: #ffd54f; color: #4e342e; }
.yjj-tag--grey { background: #eceff1; color: #78909c; }

/* ---- 江湖召唤令横向标签条（YJJ share-tabbar） ---- */
.yjj-tabbar {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  background: linear-gradient(135deg, #fff8e7 0%, #f5e5c4 100%);
  border: 1px solid #e8c995;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.08);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.yjj-tabbar::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 164, 108, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.yjj-tabbar-title {
  padding: 0 14px;
  color: #8b4513;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 3px;
  border-right: 1px solid rgba(139, 69, 19, 0.25);
  white-space: nowrap;
  font-family: var(--portal-font-serif);
}

.yjj-tab {
  padding: 8px 16px;
  border-radius: 10px;
  color: #6e4b1f;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.yjj-tab:hover { color: #402f14; background: rgba(255, 255, 255, 0.55); transform: translateY(-1px); }

.yjj-tab.is-active {
  color: #fff5d8;
  background: linear-gradient(135deg, #8b4513 0%, #a3792f 100%);
  box-shadow: 0 4px 10px rgba(139, 69, 19, 0.3);
}

.yjj-bg .portal-footer { background: rgba(33, 24, 12, 0.92); }

/* ---- 江湖广场：统计栏 / 商城入口 / 六绝网格 ---- */
.yjj-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
  text-align: center;
}

.yjj-hero-stats > * {
  flex: 1 1 calc(20% - 8px);
  min-width: 0;
}

.yjj-stat-val {
  font-size: 1.7rem;
  font-weight: 600;
  color: #fff5d8;
  line-height: 1.2;
}

.yjj-stat-val small {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.8;
  margin-left: 4px;
}

.yjj-stat-label {
  color: #e8c995;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.yjj-store-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #fff3d6 0%, #f8dda0 50%, #e8b86a 100%);
  border: 1px solid #c68642;
  border-radius: 12px;
  padding: 14px 20px;
  text-decoration: none;
  color: #5a3310;
}

.yjj-store-banner__ico { font-size: 2rem; line-height: 1; flex-shrink: 0; }

.yjj-store-banner__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.yjj-store-banner__desc {
  font-size: 0.78rem;
  color: #8b5a2b;
  margin-top: 3px;
}

.yjj-store-banner__cta {
  flex-shrink: 0;
  background: #5a3310;
  color: #fff8e7;
  padding: 8px 18px;
  border-radius: 18px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.yjj-grid--six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.yjj-six-cell {
  background: linear-gradient(135deg, #fff8e7 0%, #fbeed4 100%);
  border: 1px solid #d2a46c;
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  text-decoration: none;
  color: #5a3310;
  display: block;
}

.yjj-six-cell__ico {
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 6px;
}

.yjj-six-cell__title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.yjj-six-cell__desc {
  font-size: 0.72rem;
  color: #8b7a5c;
  margin-top: 4px;
}

.yjj-section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yjj-section-divider::before,
.yjj-section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c68642, transparent);
}

.yjj-section-divider span {
  color: #5a3310;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* 窄屏表格横向滚动 */
.portal-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.portal-table-scroll > .table {
  margin-bottom: 0;
  min-width: 480px;
}

@media (max-width: 991.98px) {
  .yjj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yjj-grid--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yjj-tabbar-title { display: none; }
  .yjj-hero-stats > * { flex: 1 1 calc(33.33% - 8px); }
}

@media (max-width: 575.98px) {
  .yjj-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
  .portal-body .page-shell {
    padding-top: 4.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    overflow-x: clip;
  }

  .portal-hero { padding-top: 5.5rem; }

  /* 首页全屏 Hero：去掉 100vw 负边距（移动端横向溢出主因） */
  .portal-cinema {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-top: -4.5rem;
    margin-bottom: 1.5rem;
    min-height: calc(100svh - 0px);
    padding: 5rem 1rem 5.5rem;
    box-sizing: border-box;
    justify-content: center;
  }

  .portal-cinema__inner {
    margin-top: 0;
    padding: 0 0.25rem;
    width: 100%;
    max-width: 100%;
  }

  .portal-cinema__eyebrow {
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    padding: 0.25rem 0.9rem;
    margin-bottom: 1rem;
  }

  .portal-cinema__title {
    font-size: clamp(1.45rem, 6.8vw, 2.2rem);
    letter-spacing: 0.04em;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: anywhere;
    padding: 0 0.15rem;
  }

  .portal-cinema__en {
    letter-spacing: 0.18em;
    padding-left: 0;
    font-size: 0.62rem;
    line-height: 1.6;
    margin-bottom: 0.85rem;
    overflow-wrap: anywhere;
  }

  .portal-cinema__tagline {
    letter-spacing: 0.06em;
    font-size: 0.82rem;
    line-height: 1.75;
    padding: 0 0.5rem;
    overflow-wrap: anywhere;
  }

  .portal-cinema__scroll {
    bottom: 1.2rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  /* 欢迎页全屏 Hero */
  .portal-hero--landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4.5rem 1rem 2.5rem;
    min-height: auto;
  }

  .portal-hero__brand {
    left: 1rem;
    top: 0.85rem;
  }

  .portal-hero__brand-mark {
    font-size: 1.35rem;
    letter-spacing: 0.1em;
  }

  .portal-hero__enter {
    margin-bottom: 1rem;
    padding: 0.45rem 1.1rem;
    font-size: 0.88rem;
    letter-spacing: 0.1em;
  }

  .portal-hero--landing .portal-hero__title {
    margin-top: 0;
    font-size: clamp(1.5rem, 7vw, 2.4rem);
    letter-spacing: 0.05em;
  }

  .portal-hero__entrybar {
    max-width: 100%;
    width: 100%;
    gap: 0.6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-entry {
    padding: 0.48rem 0.65rem;
    font-size: 0.82rem;
  }

  .hero-entry__ico {
    width: 1.65rem;
    height: 1.65rem;
    background-size: 0.95rem;
  }

  .portal-landing-showcase {
    max-width: 100%;
    gap: 0.5rem;
    margin-top: 1.1rem;
  }

  .portal-landing-showcase__item {
    height: 58px;
  }

  .portal-hero__actions { flex-direction: column; align-items: stretch; }
  .cta-strip { flex-direction: column; align-items: flex-start; }

  .news-row { gap: 0.5rem; }
  .news-row__meta { align-self: flex-start; }

  /* 内页 Hero / 列表页 */
  .portal-main-hero,
  .portal-main-hero--banner {
    padding: 1.6rem 1rem;
    min-height: 200px;
    margin-bottom: 1.25rem;
  }

  .portal-main-hero h1,
  .portal-main-hero--banner h1 {
    letter-spacing: 0.06em;
    font-size: clamp(1.45rem, 5vw, 2rem);
    overflow-wrap: anywhere;
  }

  .mir-list-hero {
    min-height: 200px;
    padding: 1.5rem 1rem;
    margin-bottom: 1.25rem;
  }

  .mir-list-hero h1 {
    letter-spacing: 0.08em;
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    overflow-wrap: anywhere;
  }

  .mir-list-hero p { letter-spacing: 0.06em; }

  .mir-tabbar {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: flex-start;
    padding-bottom: 0.5rem;
  }

  .mir-article-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.45;
  }

  .mir-article-meta { white-space: normal; }

  /* 合伙人 / 新闻 */
  .partner-landing {
    min-height: 360px;
    padding: 2.5rem 1rem;
    margin-bottom: 1.25rem;
  }

  .partner-landing__eyebrow { letter-spacing: 0.14em; }

  .partner-landing h1 {
    letter-spacing: 0.08em;
    font-size: clamp(1.8rem, 6vw, 2.8rem);
  }

  .partner-benefits { padding: 1.25rem 1rem; }

  .partner-ecology__header {
    min-height: 220px;
    padding: 1.5rem 1rem;
  }

  .partner-ecology__section { padding: 1.2rem 1rem; }

  .news-panel { padding: 1.1rem 1rem; }

  .feature-card { padding: 1.2rem 1rem; }

  .portal-footer { padding: 1.6rem 1rem; }

  .portal-footer__nav {
    gap: 0.5rem 0.85rem;
  }

  .portal-footer__nav a {
    font-size: 0.88rem;
  }

  /* YJJ 江湖页 */
  .yjj-bg { background-attachment: scroll; }

  .yjj-hero {
    padding: 1.2rem 1rem;
    border-radius: 12px;
  }

  .yjj-hero h1 {
    letter-spacing: 0.06em !important;
    font-size: 1.2rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .yjj-hero .yjj-hero-sub {
    font-size: 0.82rem;
    line-height: 1.55;
    display: block;
    max-width: 100%;
  }

  .yjj-hero-stats > * {
    flex: 1 1 calc(50% - 8px);
  }

  .yjj-stat-val { font-size: 1.35rem; }

  .yjj-stat-label {
    letter-spacing: 0.04em;
    font-size: 0.78rem;
  }

  .yjj-grid--six { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .yjj-store-banner {
    flex-wrap: wrap;
    padding: 12px 14px;
    gap: 10px;
  }

  .yjj-store-banner__cta {
    width: 100%;
    text-align: center;
  }

  .yjj-card {
    padding: 1.1rem 1rem;
    border-radius: 12px;
  }

  .yjj-card form.d-flex {
    max-width: 100% !important;
    width: 100%;
    flex-wrap: wrap;
  }

  .yjj-card form.d-flex .btn { flex-shrink: 0; }

  .yjj-prize {
    flex: 1 1 100%;
    min-width: 0;
  }

  .yjj-rank-row {
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 10px 12px;
  }

  .yjj-rank-row .ps-3 {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 0.65rem !important;
    overflow-wrap: anywhere;
  }

  .yjj-rank-amt {
    margin-left: auto;
    font-size: 0.95rem;
  }

  .yjj-tabbar {
    padding: 8px 10px;
    gap: 2px;
    border-radius: 12px;
  }

  .yjj-tab {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .yjj-section-divider span {
    font-size: 0.95rem;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
  }

  .yjj-tile {
    min-height: 118px;
    padding: 1.1rem 1rem;
  }

  .yjj-tile h3 { font-size: 1.05rem; }

  /* Wiki 角色页：纵向堆叠，去掉侧边绝对定位 */
  .wiki-role-page {
    margin: -0.5rem 0 -2rem;
    min-height: auto;
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
  }

  .wiki-role-back {
    position: static;
    margin: 1rem 1rem 0;
    display: inline-block;
    align-self: flex-start;
  }

  .wiki-role-nav {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 1rem 0;
    padding: 0;
  }

  .wiki-role-nav a::before { display: none; }

  .wiki-role-nav a {
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(163, 139, 109, 0.35);
    background: rgba(255, 255, 255, 0.55);
  }

  .wiki-role-copy {
    margin: 1.25rem 1rem 0;
    padding-top: 0;
    width: auto;
  }

  .wiki-role-copy h1 {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    overflow-wrap: anywhere;
  }
}

@media (max-width: 575.98px) {
  .portal-cinema__title {
    font-size: clamp(1.3rem, 6.2vw, 1.85rem);
  }

  .portal-cinema__tagline {
    font-size: 0.78rem;
  }

  .showcase__pane-inner {
    padding: 1.5rem 1rem;
  }

  .showcase__zonenav {
    gap: 0.35rem;
    padding: 0 0.5rem;
  }

  .showcase__zonelink {
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem;
  }

  .yjj-hero-stats > * {
    flex: 1 1 calc(50% - 8px);
  }

  .yjj-six-cell {
    padding: 10px 8px;
  }

  .yjj-six-cell__ico { font-size: 1.45rem; }

  .yjj-six-cell__title { font-size: 0.82rem; }

  .yjj-card form.d-flex {
    flex-direction: column;
    align-items: stretch;
  }

  .yjj-card form.d-flex .btn { width: 100%; }

  .partner-benefit-table table { min-width: 560px; }
}
