:root {
  color-scheme: light;
  --bg: #eef0f3;
  --panel: #ffffff;
  --panel-soft: #f6f7f9;
  --line: #d9dce3;
  --text: #26232d;
  --muted: #74717d;
  --brand: #b48b42;
  --brand-strong: #805b28;
  --pink: #f25d90;
  --green: #27b986;
  --amber: #f0a72b;
  --red: #ed5c58;
  --violet: #8b6df6;
  --shadow: 0 18px 42px rgba(68, 48, 32, 0.13);
  --shadow-soft: 0 12px 28px rgba(68, 48, 32, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #e7eaf0 0, #f6f7f9 430px, var(--bg) 100%);
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(62, 58, 77, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 58, 77, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, transparent 3rem, #000 15rem, transparent 94%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(203, 175, 126, 0.72);
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 22px rgba(73, 48, 30, 0.06);
}

.topbar__inner {
  width: min(1260px, calc(100% - 32px));
  height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  color: #241f2a;
  white-space: nowrap;
}

.brand__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(185, 138, 50, 0.3);
}

.brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #5e5365;
  min-width: 0;
}

.topnav a {
  position: relative;
  padding: 19px 1px 17px;
  transition: color 0.18s ease;
}

.topnav a::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 10px;
  left: 50%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #bd8d35, #9a63d4);
  transition: right 0.2s ease, left 0.2s ease;
}

.topnav a:hover::after {
  right: 0;
  left: 0;
}

.topnav a:hover,
.panel__head a:hover,
.side-menu a:hover {
  color: var(--brand-strong);
}

.search {
  position: relative;
  width: min(330px, 30vw);
  height: 36px;
  margin-left: auto;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  overflow: visible;
}

.search input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  padding: 0 12px;
  background: transparent;
  outline: 0;
}

.search button,
.login-button,
.text-button,
.code-row button,
.server,
.tabs button,
.close-button {
  border: 0;
  cursor: pointer;
}

.search button {
  width: 42px;
  height: 100%;
  background: #fff1d2;
  color: var(--brand-strong);
  font-size: 19px;
  border-radius: 0 7px 7px 0;
}

.search-results {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  left: 0;
  z-index: 50;
  display: none;
  width: auto;
  max-height: 382px;
  padding: 7px;
  overflow-y: auto;
  border: 1px solid rgba(213, 177, 103, 0.36);
  border-radius: 8px;
  background: rgba(31, 29, 38, 0.98);
  box-shadow: 0 22px 48px rgba(14, 12, 18, 0.34);
  backdrop-filter: blur(16px);
}

.search-results.show {
  display: grid;
  gap: 3px;
  animation: search-menu-in 0.16s ease-out;
}

.search-results a {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #f2eef3;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search-results a:hover,
.search-results a.active {
  border-color: rgba(222, 185, 111, 0.28);
  background: linear-gradient(90deg, rgba(199, 151, 74, 0.18), rgba(135, 87, 142, 0.16));
}

.search-results a span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.search-results strong,
.search-results small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results strong {
  font-size: 13px;
}

.search-results small {
  color: #a9a4ae;
  font-size: 11px;
}

.search-results b {
  color: #d9b66e;
  font-size: 22px;
  font-weight: 400;
}

.search-results__empty {
  padding: 18px 12px;
  color: #aaa5af;
  text-align: center;
}

@keyframes search-menu-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-button,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #d7a94b, #9d6c20);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(185, 138, 50, 0.26);
}

.page-shell {
  width: min(1260px, calc(100% - 32px));
  margin: 18px auto 56px;
}

.hero {
  position: relative;
  min-height: 326px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111827;
  border: 1px solid rgba(204, 176, 128, 0.66);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 1;
  border: 1px solid rgba(255, 242, 213, 0.23);
  border-radius: 5px;
  pointer-events: none;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 15, 28, 0), rgba(8, 15, 28, 0.42)),
    linear-gradient(90deg, rgba(9, 16, 28, 0.54), rgba(9, 16, 28, 0.16) 36%, rgba(9, 16, 28, 0));
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(560px, 72%);
  padding: 72px 56px 42px;
  color: #fff;
}

.hero__updated {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(9, 16, 28, 0.48);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.eyebrow {
  margin: 0 0 8px;
  color: #f2d58b;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);
}

.hero h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: 0;
  color: #fff8df;
  text-shadow:
    0 1px 0 rgba(116, 79, 24, 0.72),
    0 4px 18px rgba(0, 0, 0, 0.42),
    0 16px 34px rgba(0, 0, 0, 0.28);
}

.hero__copy {
  margin: 15px 0 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 16px;
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}

.hero__meta {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  gap: 10px;
  color: #fff;
}

.hero__meta span {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(4, 12, 24, 0.54);
  backdrop-filter: blur(8px);
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(255, 255, 255, 0.98)),
    var(--panel);
  box-shadow: 0 10px 26px rgba(68, 48, 32, 0.07);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(185, 138, 50, 0.8), rgba(154, 99, 212, 0.55), transparent 82%);
  pointer-events: none;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 240px;
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

.sidebar,
.rightbar {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 14px;
}

.brand-card {
  position: relative;
  min-height: 430px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(226, 216, 200, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 244, 0.98)),
    #fff;
  box-shadow: 0 16px 34px rgba(68, 48, 32, 0.09);
  overflow: hidden;
}

.brand-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #e0b85e, #d87bad, #8b6df6);
}

.publisher-logo {
  width: 150px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.game-logo {
  width: 154px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-card__divider {
  width: 76%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(116, 107, 120, 0.28), transparent);
}

.contact-box {
  width: min(100%, 156px);
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 8px;
  padding: 16px 10px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 247, 232, 0.88), rgba(255, 255, 255, 0.82));
  box-shadow: inset 0 0 0 1px rgba(226, 216, 200, 0.65);
}

.contact-box h2 {
  margin: 0;
  color: #3d3740;
  font-size: 17px;
  letter-spacing: 0;
}

.social-links {
  display: grid;
  grid-template-columns: repeat(4, 28px);
  gap: 6px;
  justify-content: center;
}

.social-links a {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(226, 216, 200, 0.82),
    0 8px 18px rgba(68, 48, 32, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.social-links img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  display: block;
}

.social-links a:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 2px rgba(42, 168, 255, 0.5),
    0 10px 20px rgba(42, 168, 255, 0.12);
}

.content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.panel {
  padding: 16px;
}

.panel.compact {
  padding: 14px;
}

.panel__head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel__head h2 {
  margin: 0;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.panel__head h2::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f0c66f, #9a63d4);
}

.panel__head a,
.text-button {
  color: var(--brand-strong);
  background: transparent;
  font-size: 13px;
}

.side-menu {
  display: grid;
  gap: 6px;
}

.side-menu a {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  color: #4b5f78;
}

.side-menu a.active {
  background: linear-gradient(135deg, #fff3d8, #f3e6ff);
  color: var(--brand-strong);
  font-weight: 800;
}

.server-list,
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.server,
.tabs button {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  background: #eef2f6;
  color: #50637a;
}

.server.active,
.tabs button.active {
  background: #1f2a37;
  color: #fff;
}

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

.quick-card {
  position: relative;
  min-height: 152px;
  display: flex;
  align-items: flex-end;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.quick-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--quick-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
  transition: transform 0.26s ease;
}

.quick-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 18, 30, 0.04), rgba(10, 18, 30, 0.76)),
    linear-gradient(90deg, rgba(10, 18, 30, 0.46), rgba(10, 18, 30, 0.05));
}

.quick-card:hover,
.character-card:hover {
  transform: translateY(-2px);
  border-color: rgba(185, 138, 50, 0.48);
  box-shadow: 0 18px 34px rgba(68, 48, 32, 0.14);
}

.quick-card:hover::before {
  transform: scale(1.06);
}

.quick-card__icon {
  display: none;
}

.quick-card strong,
.character-card strong,
.wiki-card strong {
  font-size: 15px;
}

.quick-card__body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 15px;
  color: #fff;
}

.quick-card small,
.character-card small,
.code-row span {
  color: var(--muted);
}

.quick-card small {
  color: rgba(255, 255, 255, 0.82);
}

.accent-blue .quick-card__icon { background: var(--brand); }
.accent-pink .quick-card__icon { background: var(--pink); }
.accent-green .quick-card__icon { background: var(--green); }
.accent-amber .quick-card__icon { background: var(--amber); }
.accent-red .quick-card__icon { background: var(--red); }
.accent-violet .quick-card__icon { background: var(--violet); }

.code-list,
.comments,
.article-list,
.stat-list {
  display: grid;
  gap: 10px;
}

.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.code-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.code-row strong {
  word-break: break-word;
}

.code-row button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: #1f2a37;
  color: #fff;
}

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

.character-card {
  position: relative;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: stretch;
  min-height: 104px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.character-card__media,
.wiki-card__media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
  background:
    linear-gradient(45deg, transparent 48.5%, rgba(255, 255, 255, 0.22) 49%, rgba(255, 255, 255, 0.22) 51%, transparent 51.5%),
    linear-gradient(-45deg, transparent 48.5%, rgba(255, 255, 255, 0.16) 49%, rgba(255, 255, 255, 0.16) 51%, transparent 51.5%),
    radial-gradient(circle at 48% 38%, rgba(255, 255, 255, 0.86), transparent 34%),
    linear-gradient(135deg, #faf5ea, #ddc99f 58%, #b69158);
  overflow: hidden;
}

.character-card__media {
  background:
    linear-gradient(45deg, transparent 48.5%, rgba(255, 255, 255, 0.22) 49%, rgba(255, 255, 255, 0.22) 51%, transparent 51.5%),
    linear-gradient(-45deg, transparent 48.5%, rgba(255, 255, 255, 0.16) 49%, rgba(255, 255, 255, 0.16) 51%, transparent 51.5%),
    radial-gradient(circle at 48% 38%, rgba(255, 255, 255, 0.86), transparent 34%),
    linear-gradient(135deg, #faf5ea, #ddc99f 58%, #b69158);
}

.character-card__media::after,
.wiki-card__media::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 250, 237, 0.34);
  transform: rotate(45deg);
}

.character-card__media img {
  position: relative;
  z-index: 1;
  width: 82%;
  height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(72, 48, 28, 0.2));
}

.wiki-card__media img {
  position: relative;
  z-index: 1;
  width: 82%;
  height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(72, 48, 28, 0.2));
}

.wiki-card__media b {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.94);
  font-size: 30px;
  font-weight: 900;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.24);
}

.character-card__body {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
}

.rank {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 7px;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.rank.ssr {
  background: #f1a42c;
}

.rank.sr {
  background: #7a8af2;
}

.avatar {
  width: 64px;
  height: 64px;
  margin-top: 12px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent),
    linear-gradient(135deg, #2f89ff, #fa668c);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

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

.wiki-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  color: #302a35;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.wiki-card:hover {
  transform: translateY(-2px);
  border-color: rgba(185, 138, 50, 0.48);
  box-shadow: 0 14px 26px rgba(68, 48, 32, 0.12);
}

.wiki-card small {
  color: var(--muted);
}

#growth,
#systems,
#events,
#guides {
  border-color: rgba(218, 203, 178, 0.9);
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.98), rgba(255, 255, 255, 0.98) 54%, rgba(247, 242, 232, 0.9)),
    #fff;
}

#growth .panel__head,
#systems .panel__head,
#events .panel__head,
#guides .panel__head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(226, 216, 200, 0.75);
}

#growth .wiki-grid,
#systems .wiki-grid,
#events .wiki-grid,
#guides .wiki-grid {
  gap: 12px;
}

#growth .wiki-card,
#systems .wiki-card,
#events .wiki-card,
#guides .wiki-card {
  border-color: rgba(214, 190, 150, 0.8);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 241, 0.96));
  box-shadow: 0 10px 22px rgba(104, 69, 32, 0.08);
}

#growth .wiki-card__media,
#systems .wiki-card__media,
#events .wiki-card__media,
#guides .wiki-card__media {
  background:
    radial-gradient(circle at 48% 38%, rgba(255, 255, 255, 0.78), transparent 34%),
    linear-gradient(135deg, #f9f2e3, #d9c49a 58%, #b69158);
}

#growth .wiki-card__media::after,
#systems .wiki-card__media::after,
#events .wiki-card__media::after,
#guides .wiki-card__media::after {
  inset: 12px;
  border-color: rgba(255, 255, 255, 0.24);
}

#growth .wiki-card__media img,
#systems .wiki-card__media img,
#events .wiki-card__media img,
#guides .wiki-card__media img {
  width: 82%;
  height: 82%;
}

#growth .wiki-card:hover,
#systems .wiki-card:hover,
#events .wiki-card:hover,
#guides .wiki-card:hover {
  border-color: rgba(185, 138, 50, 0.68);
  box-shadow: 0 16px 30px rgba(104, 69, 32, 0.16);
}

.article-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  color: #344256;
}

.wiki-grid a {
  border-bottom: 0;
  padding-bottom: 0;
}

.article-list a.wiki-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  height: 104px;
  min-height: 104px;
  padding-bottom: 0;
  border: 1px solid var(--line);
  color: #302a35;
}

.article-list a.wiki-card .character-card__media {
  min-height: 104px;
}

.article-list a.wiki-card .character-card__body {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
}

.article-list a:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.article-list span {
  flex: 0 0 auto;
  min-width: 36px;
  padding: 3px 6px;
  border-radius: 6px;
  background: #eef7ff;
  color: var(--brand-strong);
  font-size: 12px;
  text-align: center;
}

.comments article {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.comment-avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #1f2a37;
  color: #fff;
}

.comments p {
  margin: 0;
  line-height: 1.55;
}

.hot-list {
  margin: 0;
  padding-left: 24px;
}

.hot-list li {
  margin: 0 0 10px;
  color: var(--muted);
}

.hot-list a {
  color: #344256;
}

.event-card {
  min-width: 100%;
  display: grid;
  gap: 10px;
  color: #2f2933;
}

.event-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.event-card strong {
  line-height: 1.45;
  text-align: center;
}

.event-carousel { position:relative; padding-bottom:22px; touch-action:pan-y; }
.event-carousel__viewport { overflow:hidden; border-radius:8px; }
.event-carousel__track { display:flex; transition:transform .42s cubic-bezier(.22,.7,.25,1); }
.event-carousel__arrow { position:absolute; top:calc((100% - 42px)/2); width:28px; height:38px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.72); border-radius:6px; background:rgba(34,28,37,.68); color:#fff; font-size:25px; line-height:1; box-shadow:0 5px 14px rgba(30,22,31,.18); cursor:pointer; opacity:.86; transition:opacity .18s ease,background .18s ease; }
.event-carousel__arrow:hover { opacity:1; background:rgba(81,54,79,.86); }
.event-carousel__arrow--prev { left:7px; }
.event-carousel__arrow--next { right:7px; }
.event-carousel__dots { position:absolute; inset:auto 0 0; display:flex; justify-content:center; gap:7px; }
.event-carousel__dots button { width:7px; height:7px; padding:0; border:0; border-radius:50%; background:#cfc5cf; cursor:pointer; transition:width .18s ease,background .18s ease,border-radius .18s ease; }
.event-carousel__dots button.active { width:20px; border-radius:5px; background:#966092; }

.update-list {
  display: grid;
  gap: 8px;
  height: 242px;
  align-content: start;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(185, 138, 50, 0.42) transparent;
}

.update-list a {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 8px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: #3d3541;
}

.update-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-list time {
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.mobile-tabbar {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 40;
  transform: translate(-50%, 18px);
  padding: 10px 14px;
  border-radius: 8px;
  background: #1f2a37;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.login-modal {
  width: min(380px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.login-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.login-modal form {
  position: relative;
  display: grid;
  gap: 13px;
  padding: 24px;
}

.login-modal h2,
.login-modal p {
  margin: 0;
}

.login-modal p {
  color: var(--muted);
  line-height: 1.5;
}

.login-modal label {
  display: grid;
  gap: 6px;
  color: #344256;
}

.login-modal input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eef2f6;
  color: #42526a;
  font-size: 20px;
}

/* Homepage finishing details */
.social-links a:nth-child(1) { background: #f2f9ff; }
.social-links a:nth-child(2) { background: #eefaff; }
.social-links a:nth-child(3) { background: #f1f5ff; }
.social-links a:nth-child(4) { background: #f5f5f5; }

.panel__head {
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(226, 216, 200, 0.66);
}

.panel__head h2::before {
  box-shadow: 0 0 0 3px rgba(210, 171, 92, 0.1);
}

.quick-card {
  border-color: rgba(218, 199, 166, 0.92);
}

.quick-card__body {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2px);
}

.character-card {
  box-shadow: 0 8px 18px rgba(78, 53, 31, 0.06);
}

#world .article-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#world .article-list a {
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid rgba(218, 203, 178, 0.88);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 250, 241, 0.94), rgba(250, 246, 255, 0.9));
  box-shadow: 0 8px 18px rgba(80, 53, 31, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#world .article-list a:hover {
  transform: translateY(-2px);
  border-color: rgba(185, 138, 50, 0.52);
  box-shadow: var(--shadow-soft);
}

#world .article-list span {
  width: 52px;
  min-width: 52px;
  padding: 5px 0;
  background: linear-gradient(135deg, #fff0ce, #efe2fa);
  font-weight: 700;
}

.event-status {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 5px;
  padding: 0 7px;
  border: 1px solid #d8cfd4;
  border-radius: 6px;
  background: #f5f1f3;
  color: #8a7f85;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

.event-card--ended img {
  filter: saturate(0.78) contrast(0.96);
}

.update-list a {
  border: 1px solid rgba(226, 216, 200, 0.6);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.update-list a:hover {
  transform: translateX(2px);
  border-color: rgba(185, 138, 50, 0.42);
  background: #fffaf1;
}

.modal-submit {
  border: 0;
  margin-top: 4px;
}

/* Refined fantasy-tech visual system */
.topbar {
  border-bottom-color: rgba(213, 177, 103, 0.48);
  background: rgba(24, 23, 31, 0.94);
  box-shadow: 0 10px 30px rgba(22, 20, 29, 0.18);
}

.brand {
  color: #f7f4ee;
}

.brand__mark {
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 0 3px rgba(193, 146, 76, 0.11), 0 8px 20px rgba(0, 0, 0, 0.28);
}

.topnav {
  color: #c7c3ce;
}

.topnav a:hover {
  color: #f0d18f;
}

.search {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.search input {
  color: #f5f3f7;
}

.search input::placeholder {
  color: #9895a1;
}

.search button {
  background: rgba(213, 177, 103, 0.16);
  color: #efd08f;
}

.login-button {
  border: 1px solid rgba(231, 202, 142, 0.32);
  background: linear-gradient(135deg, #b88b3d, #76503b 55%, #74517d);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.page-shell {
  margin-top: 22px;
}

.hero {
  border-color: rgba(43, 39, 52, 0.66);
  box-shadow: 0 22px 52px rgba(31, 28, 39, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.hero::after {
  border-color: rgba(255, 237, 199, 0.3);
}

.hero__updated {
  border: 1px solid rgba(255, 255, 255, 0.19);
  background: rgba(25, 22, 32, 0.68);
}

.layout,
.content,
.sidebar,
.rightbar {
  gap: 16px;
}

.panel,
.brand-card {
  border-color: rgba(199, 202, 211, 0.92);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(31, 28, 39, 0.075), inset 0 1px 0 #fff;
}

.panel::before {
  height: 3px;
  background: linear-gradient(90deg, #bd8f43 0, #d093ae 35%, #7565a8 64%, transparent 92%);
}

.panel__head {
  min-height: 32px;
  margin-bottom: 14px;
  padding-bottom: 11px;
  border-bottom-color: #e2e3e8;
}

.panel__head h2 {
  color: #302c38;
  font-size: 18px;
}

.panel__head h2::before {
  width: 3px;
  height: 19px;
  border-radius: 1px;
  background: linear-gradient(180deg, #d4a84e, #8b5a91);
  box-shadow: 4px 0 0 rgba(139, 90, 145, 0.1);
}

.section-note {
  padding: 4px 8px;
  border: 1px solid #e2e0e6;
  border-radius: 6px;
  background: #f7f6f9;
  color: #7a7480;
  font-size: 11px;
}

.brand-card {
  border-color: rgba(199, 202, 211, 0.94);
  background: linear-gradient(180deg, #fff 0%, #f8f7fa 100%);
}

.brand-card::before {
  background: linear-gradient(90deg, #c79a4c, #cf789f 52%, #7664ab);
}

.brand-card__divider {
  background: linear-gradient(90deg, transparent, rgba(67, 61, 75, 0.25), transparent);
}

.contact-box {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, #292631, #3a3341);
  box-shadow: 0 14px 28px rgba(35, 30, 42, 0.19), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.contact-box h2 {
  color: #f2edf2;
  font-size: 15px;
}

.social-links a {
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
}

.quick-card {
  border-color: rgba(54, 49, 63, 0.7);
  box-shadow: 0 12px 26px rgba(30, 27, 38, 0.16);
}

.quick-card::after {
  background: linear-gradient(180deg, rgba(16, 15, 22, 0.03), rgba(21, 18, 27, 0.88));
}

.quick-card__body {
  padding: 17px;
  border-top-color: rgba(231, 204, 150, 0.28);
  background: linear-gradient(90deg, rgba(25, 22, 31, 0.34), transparent);
}

.quick-card strong {
  color: #fffaf0;
  font-size: 16px;
}

.character-card,
.wiki-card,
.article-list a.wiki-card {
  border-color: #d8d8df;
  background: linear-gradient(145deg, #fff 0%, #f7f7f9 100%);
  box-shadow: 0 9px 22px rgba(35, 31, 43, 0.075);
}

.character-card__body {
  border-left: 1px solid rgba(255, 255, 255, 0.7);
}

.character-card strong,
.wiki-card strong {
  color: #332f3a;
}

#growth,
#systems,
#events,
#guides {
  border-color: rgba(199, 202, 211, 0.92);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 247, 250, 0.98));
}

#growth .wiki-card,
#systems .wiki-card,
#events .wiki-card,
#guides .wiki-card {
  border-color: #d8d8df;
  background: linear-gradient(145deg, #fff, #f5f5f8);
  box-shadow: 0 9px 22px rgba(35, 31, 43, 0.075);
}

#growth .wiki-card__media,
#systems .wiki-card__media,
#events .wiki-card__media,
#guides .wiki-card__media {
  background:
    linear-gradient(45deg, transparent 48.5%, rgba(255, 255, 255, 0.24) 49%, rgba(255, 255, 255, 0.24) 51%, transparent 51.5%),
    radial-gradient(circle at 48% 38%, rgba(255, 255, 255, 0.82), transparent 34%),
    linear-gradient(135deg, #f4f0e8, #d9cdb9 56%, #9f8c77);
}

.character-card__media,
.wiki-card__media,
#growth .wiki-card__media,
#systems .wiki-card__media,
#events .wiki-card__media,
#guides .wiki-card__media {
  background:
    linear-gradient(45deg, transparent 48.5%, rgba(255, 255, 255, 0.07) 49%, rgba(255, 255, 255, 0.07) 51%, transparent 51.5%),
    linear-gradient(-45deg, transparent 48.5%, rgba(217, 179, 108, 0.06) 49%, rgba(217, 179, 108, 0.06) 51%, transparent 51.5%),
    linear-gradient(145deg, #27242f 0%, #46404d 58%, #866f58 100%);
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.12), inset 0 0 24px rgba(0, 0, 0, 0.16);
}

.character-card__media::after,
.wiki-card__media::after,
#growth .wiki-card__media::after,
#systems .wiki-card__media::after,
#events .wiki-card__media::after,
#guides .wiki-card__media::after {
  border-color: rgba(235, 204, 143, 0.2);
}

.quick-card:hover,
.character-card:hover,
.wiki-card:hover,
#growth .wiki-card:hover,
#systems .wiki-card:hover,
#events .wiki-card:hover,
#guides .wiki-card:hover {
  transform: translateY(-3px);
  border-color: rgba(163, 115, 121, 0.64);
  box-shadow: 0 18px 36px rgba(40, 32, 45, 0.14);
}

#world .article-list a {
  border-color: #d9d9e0;
  background: linear-gradient(135deg, #fff 0%, #f5f4f8 100%);
  box-shadow: 0 8px 19px rgba(36, 31, 43, 0.065);
}

#world .article-list span {
  border: 1px solid rgba(179, 145, 83, 0.24);
  background: linear-gradient(135deg, #f8e9c8, #eaddec);
  color: #755434;
}

.event-card img {
  border-color: #cfd1d8;
  box-shadow: 0 8px 20px rgba(35, 31, 43, 0.12);
}

.event-carousel__arrow {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(28, 25, 34, 0.76);
  backdrop-filter: blur(8px);
}

.update-list a {
  border-color: #e0e1e6;
  background: linear-gradient(90deg, #f8f8fa, #fff);
}

.update-list time {
  color: #9c6e31;
}

.update-list a:hover {
  border-color: rgba(151, 101, 143, 0.45);
  background: #faf7fb;
}

.mobile-tabbar {
  border-top-color: rgba(213, 177, 103, 0.42);
  background: rgba(25, 24, 31, 0.96);
}

.mobile-tabbar a {
  color: #e5e1e8;
}

@media (max-width: 1050px) {
  .layout {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .rightbar {
    position: static;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  body {
    padding-bottom: 58px;
  }

  .topbar__inner,
  .page-shell {
    width: min(100% - 20px, 720px);
  }

  .topbar__inner {
    height: 56px;
    gap: 10px;
  }

  .topnav,
  .login-button {
    display: none;
  }

  .search {
    width: auto;
    flex: 1;
  }

  .search input {
    padding: 0 10px;
  }

  .hero {
    min-height: 300px;
  }

  .hero__shade {
    background: linear-gradient(180deg, rgba(8, 15, 28, 0.44), rgba(8, 15, 28, 0.88));
  }

  .hero__content {
    width: 100%;
    padding: 64px 22px 72px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero__meta {
    left: 18px;
    right: auto;
    flex-wrap: wrap;
  }

  .layout {
    display: block;
  }

  .sidebar {
    position: static;
    margin-bottom: 14px;
  }

  .brand-card {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    grid-template-areas:
      "publisher divider game"
      "contact contact contact";
    align-items: center;
    gap: 14px;
    padding: 17px 20px;
  }

  .publisher-logo {
    grid-area: publisher;
    width: 140px;
    justify-self: center;
  }

  .game-logo {
    grid-area: game;
    width: 144px;
    justify-self: center;
  }

  .brand-card__divider {
    grid-area: divider;
    width: 1px;
    height: 58px;
  }

  .contact-box {
    grid-area: contact;
    width: min(100%, 320px);
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 0;
    padding: 12px 16px;
  }

  .side-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .side-menu a {
    justify-content: center;
    text-align: center;
  }

  .content {
    display: grid;
    gap: 14px;
  }

  .panel {
    padding: 14px;
  }

  #world .article-list {
    grid-template-columns: 1fr;
  }

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

  .rightbar {
    margin-top: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rightbar .panel.compact {
    min-width: 0;
  }

  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 56px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }

  .mobile-tabbar a {
    display: grid;
    place-items: center;
    color: #42526a;
    font-weight: 700;
  }
}

@media (max-width: 620px) {
  .brand__text {
    display: none;
  }

  .character-grid,
  .wiki-grid {
    grid-template-columns: 1fr;
  }

  .rightbar {
    grid-template-columns: 1fr;
  }

  .update-list {
    height: 196px;
  }

  .character-card,
  .wiki-card,
  .article-list a.wiki-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }
}

@media (max-width: 460px) {
  .brand__text {
    display: none;
  }

  .quick-grid,
  .character-grid,
  .wiki-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    margin-top: 12px;
  }

  .hero {
    min-height: 270px;
  }

  .hero h1 {
    font-size: 29px;
  }

  .hero__content {
    padding: 54px 18px 66px;
  }

  .hero__updated {
    right: 12px;
    bottom: 12px;
    font-size: 11px;
  }

  .brand-card {
    padding: 15px 12px;
  }

  .publisher-logo,
  .game-logo {
    width: 124px;
  }

  .contact-box {
    width: 100%;
  }

  .quick-card {
    min-height: 138px;
  }

  .panel__head {
    gap: 7px;
  }

  .section-note {
    max-width: 52%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .code-row {
    align-items: stretch;
    flex-direction: column;
  }

  .code-row button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .mobile-tabbar {
    border-top-color: rgba(213, 177, 103, 0.42);
    background: rgba(25, 24, 31, 0.96);
  }

  .mobile-tabbar a {
    color: #e5e1e8;
  }
}
