:root {
  --ink: #fff6ee;
  --muted: #d2b8aa;
  --bg: #07080b;
  --gold: #ffd36a;
  --gold-deep: #c47a12;
  --ember: #ff3b2f;
  --ember-deep: #4a0d0a;
  --ice: #7ef0ff;
  --sans: "Noto Sans TC", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  line-height: 1.55;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, a { font-family: inherit; }
#home, #youbai, #fate, #modes, #roster, #news, #enter { scroll-margin-top: calc(var(--header) + 12px); }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.16;
  background-image: repeating-linear-gradient(-18deg, transparent 0 18px, rgba(255, 255, 255, 0.035) 18px 19px);
  z-index: 0;
}
.top, main, .foot { position: relative; z-index: 1; }

/* ===== Header ===== */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header);
  padding: 0 5vw;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(12, 6, 8, 0.96), rgba(7, 8, 11, 0.92));
  border-bottom: 3px solid var(--ember);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 var(--ember-deep);
}
.mark {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold) 0%, var(--ember) 70%);
  transform: rotate(45deg);
  box-shadow: 3px 3px 0 #2a0908;
}
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 14px;
  background: rgba(22, 8, 7, 0.72);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: background 0.28s var(--ease-out), color 0.28s var(--ease-out);
}
.nav a:hover,
.nav a.is-here { background: var(--ember); color: #fff; }
.head-links {
  margin-right: auto;
  margin-left: 8px;
  display: flex;
  gap: 4px;
}
.talk-link {
  margin-right: 0;
  margin-left: 0;
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 8px 12px;
}
.talk-link:hover { color: #fff; }
.dock { display: none; }
.talk-preview {
  margin: 8px 5vw 36px;
  padding: 22px 18px 26px;
  border: 1px solid rgba(255, 211, 106, 0.35);
  background: rgba(8, 8, 12, 0.88);
}
.talk-latest {
  list-style: none;
  margin: 16px 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.talk-latest a {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #120c10;
  border-left: 3px solid var(--ember);
}
.talk-latest em {
  color: var(--gold);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}
.talk-latest strong { font-size: 16px; }
.talk-latest span { color: var(--muted); font-size: 13px; }
.back-home {
  display: inline-flex;
  align-items: center;
  margin: 0 0 16px;
  padding: 8px 14px;
  color: #2a1208;
  background: var(--gold);
  font-weight: 900;
  letter-spacing: 0.06em;
}
.back-home:hover { color: #2a1208; filter: brightness(1.06); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: min(780px, calc(100vh - var(--header)));
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 18px 24px;
  padding: 48px 5vw 28px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(7, 8, 11, 0.15) 0%, rgba(7, 8, 11, 0.2) 55%, rgba(7, 8, 11, 0.82) 100%),
    linear-gradient(90deg, rgba(7, 8, 11, 0.88) 0%, rgba(7, 8, 11, 0.55) 42%, rgba(7, 8, 11, 0.05) 70%);
}
.hero-char {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  height: 96%;
  width: auto;
  max-width: min(54vw, 760px);
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(-12px 8px 24px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
.fx-ring {
  position: absolute;
  z-index: 2;
  object-fit: contain;
  opacity: 0.22;
  animation: spin 36s linear infinite;
  pointer-events: none;
}
.fx-a { width: 180px; height: 180px; right: 18%; top: 10%; }
.fx-b { width: 120px; height: 120px; right: 8%; top: 22%; animation-duration: 48s; }
.fx-c { width: 90px; height: 90px; right: 28%; bottom: 18%; animation-direction: reverse; }
.fx-d { width: 140px; height: 140px; right: 4%; bottom: 28%; animation-duration: 56s; opacity: 0.16; }
.ribbon { width: 100%; height: auto; display: block; }
.count-mark { width: min(160px, 100%); height: auto; margin: 0 auto 4px; }
.hp img { display: block; width: 78%; height: 10px; object-fit: fill; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-copy, .vs-board { position: relative; z-index: 3; }
.hero-copy { grid-column: 1; grid-row: 1; align-self: center; max-width: none; }
.debut-tag {
  width: 196px;
  height: auto;
  margin: 0 0 10px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(255, 160, 40, 0.35));
}
.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 10px;
  color: #ffe3a3;
  background: linear-gradient(180deg, rgba(62, 28, 16, 0.94), rgba(18, 8, 8, 0.94));
  border: 1px solid rgba(255, 214, 130, 0.72);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 0 12px rgba(255, 176, 64, 0.22);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7), 0 0 8px rgba(255, 196, 90, 0.35);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  transform: skewX(-8deg);
}
h1, h2, h3 { font-weight: 900; margin: 0; }
h1 {
  font-size: clamp(18px, 2.35vw, 40px);
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 3px 0 var(--ember-deep), 0 14px 32px rgba(0, 0, 0, 0.45);
}
.lead {
  max-width: 34em;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}
.hero-actions, .enter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
  position: relative;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}
.btn-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.55) 50%, transparent 68%);
  transform: translateX(-130%);
  pointer-events: none;
}
.btn-gold:hover::after {
  transform: translateX(130%);
  transition: transform 0.7s var(--ease-out);
}
.btn-gold {
  color: #2a1208;
  background: linear-gradient(180deg, #ffe7a3 0%, #f0b429 48%, #c47a12 100%);
  box-shadow: 0 4px 0 #6a2414;
}
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost {
  color: var(--gold);
  background: rgba(8, 6, 8, 0.55);
  box-shadow: inset 0 0 0 2px var(--gold);
}
.btn-ghost:hover { background: rgba(255, 211, 106, 0.14); }

.reward {
  position: relative;
  width: min(100%, 448px);
  margin-top: 20px;
}
.combo {
  position: absolute;
  left: 20.1%;
  top: 44%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin: 0;
  color: #ff1a1a;
  line-height: 1;
  white-space: nowrap;
}
.combo b {
  font-size: 26px;
  line-height: 1;
  color: #ff1a1a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 6px rgba(120, 0, 0, 0.35);
}
.combo span {
  font-size: 14px;
  font-weight: 900;
  color: #ff1a1a;
  letter-spacing: 0.04em;
}
.perk {
  position: absolute;
  left: 66.8%;
  top: 62%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0;
  box-shadow: none;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  white-space: nowrap;
  background-image: linear-gradient(
    90deg,
    #ff2a2a 0%,
    #ff8a00 16%,
    #ffe14a 33%,
    #3dff6a 50%,
    #2ec8ff 66%,
    #7a5cff 83%,
    #ff4ad8 100%
  );
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: perk-rainbow 10s linear infinite;
}
@keyframes perk-rainbow {
  from { filter: hue-rotate(0deg) drop-shadow(0 1px 0 rgba(40, 24, 0, 0.85)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.4)); }
  to { filter: hue-rotate(360deg) drop-shadow(0 1px 0 rgba(40, 24, 0, 0.85)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.4)); }
}
@media (prefers-reduced-motion: reduce) {
  .perk, .mode-tag, .enter-float, .fx-ring,
  .js-motion .hero-char,
  .js-motion .hero-copy > *,
  .js-motion .vs-board { animation: none; }
  .js-motion .rise {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .line-qr { animation: none; }
}

.vs-board {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    "left mid right"
    "note note note";
  gap: 6px 14px;
  align-items: center;
  align-self: end;
  max-width: 520px;
  padding: 8px 12px 6px;
  background: linear-gradient(180deg, rgba(12, 8, 10, 0.55), rgba(12, 8, 10, 0.78));
  border: 1px solid rgba(255, 211, 106, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}
.side { grid-area: left; }
.side-flip { grid-area: right; }
.vs-mid { grid-area: mid; text-align: center; min-width: 92px; }
.vs-note {
  grid-area: note;
  margin: 0;
  text-align: center;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}
.side-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.side-flip .side-top { justify-content: flex-end; }
.side-top span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}
.side-top strong { letter-spacing: 0.12em; font-size: 14px; }
.side-top b {
  font-size: 22px;
  line-height: 1;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--ember-deep);
}
.hp {
  height: 8px;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 211, 106, 0.35);
  overflow: hidden;
}
.hp i {
  display: block;
  width: 78%;
  height: 100%;
  background: linear-gradient(90deg, #ffe14a, var(--ember));
}
.hp-flip i { width: 46%; margin-left: auto; }
.round {
  display: block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.timer {
  display: block;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  color: var(--ice);
  text-shadow: 0 0 16px rgba(126, 240, 255, 0.45);
}
.vs-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 2px;
}
.vs-mark {
  width: 42px;
  height: auto;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
}
.vs-chev { width: 36px; height: auto; opacity: 0.9; }
.hero-red {
  position: absolute;
  z-index: 2;
  top: -40px;
  right: 6%;
  width: min(280px, 28vw);
  height: auto;
  opacity: 0.28;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ===== Promo ===== */
.promo-strip {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  padding: 6px 5vw 28px;
}
.promo-frame {
  margin: 0;
  background: #10080c;
  border: 1px solid rgba(255, 211, 106, 0.28);
  box-shadow: 6px 6px 0 #2a0908;
  overflow: hidden;
}
.promo-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ===== Sections ===== */
.section { padding: 28px 5vw 56px; }
.section-head h2 {
  margin-top: 8px;
  font-size: clamp(30px, 3.6vw, 48px);
  text-shadow: 3px 3px 0 var(--ember-deep);
}
.section-head .lead { margin-top: 8px; }

.pvp {
  position: relative;
  margin: 0 0 36px;
  padding: 22px 16px 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 211, 106, 0.5);
  box-shadow: 8px 8px 0 #2a0908;
  background: #07080c;
}
.pvp-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.62;
  pointer-events: none;
}
.pvp .section-head,
.pvp-row { position: relative; z-index: 1; }
.pvp-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pvp-head h2 { margin-top: 0; }
.pvp-crest { width: 54px; height: auto; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45)); }
.pvp-mark {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 16px;
  width: 58px;
  height: auto;
  opacity: 0.9;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}
.pvp-row { padding-bottom: 18px; }
.pvp-row > img:not(.pvp-bar) { position: relative; z-index: 1; }
.pvp-row > img.pvp-bar {
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 0;
  width: min(100%, 720px);
  height: auto;
  transform: translateX(-50%);
  opacity: 0.9;
  pointer-events: none;
}
.pvp-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}
.pvp-row img {
  width: auto;
  height: auto;
  max-width: 100%;
}
.pvp-row img[width="394"] { max-width: min(100%, 394px); }
.pvp-row img[width="459"] { max-width: min(100%, 459px); }
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.mode-card {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 211, 106, 0.28);
  box-shadow: 6px 6px 0 #2a0908;
  background: #10080c;
}
.mode-card--featured {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 459px);
  aspect-ratio: auto;
  background: transparent;
}
.mode-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}
.mode-bg--poster {
  position: static;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}
.mode-card:hover .mode-bg { transform: scale(1.04); }
.mode-card--featured:hover .mode-bg { transform: none; }
.mode-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 72px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.youbai, .fate, .banner-wall { position: relative; }
.youbai {
  margin: 4px 5vw 20px;
  padding: 18px 16px 22px;
  background: linear-gradient(180deg, rgba(90, 16, 18, 0.55), rgba(10, 6, 8, 0.94));
  border: 1px solid rgba(255, 211, 106, 0.6);
  box-shadow: 8px 8px 0 #2a0908;
  overflow: hidden;
}
.wash {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(100%, 938px);
  height: auto;
  transform: translateX(-50%);
  opacity: 0.28;
  pointer-events: none;
}
.youbai-edge { position: relative; width: min(100%, 802px); height: auto; margin: 0 auto 8px; }
.youbai .section-head, .youbai .banner, .youbai .cast,
.fate .section-head, .fate .banner, .fate .cast { position: relative; z-index: 1; }
.youbai h2 { font-size: clamp(40px, 5vw, 68px); }
.banner { display: block; height: auto; margin: 12px auto 0; }
.w714 { width: min(100%, 714px); }
.w364 { width: min(100%, 364px); }
.w636 { width: min(100%, 636px); }
.cast {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
}
.cast li {
  width: 200px;
  text-align: center;
  background: #10080c;
  border: 1px solid rgba(255, 211, 106, 0.35);
}
.cast img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  object-position: center bottom;
  background: radial-gradient(circle at 50% 80%, rgba(255, 59, 47, 0.28), #12080c 62%);
}
.cast strong { display: block; padding: 8px 6px 10px; font-size: 18px; }
.banner-wall { padding: 20px 5vw 40px; }
.banner-wall .section-head { margin-top: 32px; }
.banner-wall .section-head:first-child { margin-top: 0; }
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.event-grid img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #10080c;
  border: 1px solid rgba(255, 211, 106, 0.22);
}
.divider { display: block; width: min(100%, 1024px); height: auto; margin: 10px auto 0; }
.fate {
  margin: 40px 0 8px;
  padding: 20px 16px 24px;
  overflow: hidden;
  border: 1px dashed rgba(180, 190, 210, 0.7);
  background: rgba(8, 10, 16, 0.88);
}
.fate-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  pointer-events: none;
}
.eyebrow-soon {
  color: #2a241c;
  background: #c5ccd6;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: none;
  text-shadow: none;
}
.cast-soon li {
  width: 228px;
  background: transparent;
  border: none;
}
.portrait-frame {
  box-sizing: border-box;
  width: 228px;
  height: 228px;
  border-style: solid;
  border-width: 22px;
  border-image-source: url("../img/Fate_bg_yangcheng.png");
  border-image-slice: 32;
  border-image-width: 22px;
  border-image-repeat: stretch;
  background: radial-gradient(circle at 50% 80%, rgba(255, 59, 47, 0.28), #12080c 62%);
}
.cast-soon .portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  background: none;
}
.cast-soon strong {
  font-size: 16px;
  line-height: 1.3;
  padding: 8px 8px 2px;
}
.cast-soon em {
  display: block;
  margin: -6px 0 10px;
  color: #d5dbe3;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.news-card { width: 96px; height: auto; }
.draw-btn { width: min(100%, 273px); height: auto; display: block; }
.enter-poster {
  grid-area: poster;
  position: relative;
  z-index: 1;
  width: min(100%, 860px);
  height: auto;
  justify-self: center;
}
.mode-body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 28px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88) 42%);
}
.mode-tag {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  color: #ffe7b0;
  background: linear-gradient(180deg, rgba(54, 24, 14, 0.92), rgba(12, 7, 8, 0.9));
  border: 1px solid rgba(255, 214, 130, 0.78);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 186, 70, 0.28);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.75), 0 0 8px rgba(255, 196, 90, 0.4);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  animation: tag-glow 3.8s ease-in-out infinite;
}
.mode-tag--hot {
  color: #fff1ea;
  background: linear-gradient(180deg, rgba(120, 28, 22, 0.94), rgba(48, 10, 10, 0.92));
  border-color: rgba(255, 140, 110, 0.8);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65), 0 0 8px rgba(255, 120, 90, 0.4);
  animation-name: tag-glow-hot;
}
@keyframes tag-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 8px rgba(255, 186, 70, 0.22); }
  50% { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 206, 110, 0.48); }
}
@keyframes tag-glow-hot {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 8px rgba(255, 80, 60, 0.22); }
  50% { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 110, 80, 0.46); }
}
.mode-body h3 {
  margin: 0 0 4px;
  font-size: 24px;
  text-shadow: 0 2px 8px #000;
}
.mode-body p { margin: 0; font-size: 13px; color: #f0ddd4; }

/* ===== Roster ===== */
.filters { display: flex; gap: 8px; margin: 16px 0; }
.chip {
  background: #160807;
  color: var(--gold);
  border: 0;
  padding: 8px 16px;
  font-weight: 900;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.chip.is-on, .chip:hover { background: var(--ember); color: #fff; }
.roster {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.roster li {
  display: flex;
  flex-direction: column;
  background: #10080c;
  border: 1px solid rgba(255, 211, 106, 0.22);
  box-shadow: 5px 5px 0 #2a0908;
  overflow: hidden;
}
.roster li[hidden] { display: none; }
.portrait {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 78%, rgba(255, 59, 47, 0.28), transparent 58%),
    linear-gradient(180deg, #1a1016, #0c080c);
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 211, 106, 0.55);
  box-shadow: inset 0 0 0 5px rgba(255, 59, 47, 0.12);
  pointer-events: none;
}
.portrait img {
  position: relative;
  z-index: 1;
  width: auto;
  height: 94%;
  max-width: 94%;
  object-fit: contain;
  object-position: center bottom;
}
.who {
  padding: 12px 12px 14px;
  text-align: center;
  background: #0c080c;
  border-top: 1px solid rgba(255, 211, 106, 0.2);
}
.who strong { display: block; font-size: 22px; line-height: 1.15; }
.who em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

/* ===== News ===== */
.news-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.news-head .news-card { width: 96px; flex: none; }
.news-head .eyebrow { margin-bottom: 6px; }
.news {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.news li { margin: 0; }
.news-link {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  color: inherit;
  background: linear-gradient(90deg, rgba(255, 59, 47, 0.2), rgba(16, 8, 12, 0.94) 26%);
  border: 1px solid rgba(255, 211, 106, 0.18);
  border-left: 4px solid var(--ember);
}
.news-link:hover { border-color: rgba(255, 211, 106, 0.7); }
.news-link .more {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.news time {
  color: #ffe3a3;
  background: linear-gradient(180deg, rgba(62, 28, 16, 0.94), rgba(18, 8, 8, 0.94));
  border: 1px solid rgba(255, 214, 130, 0.55);
  box-shadow: 0 0 10px rgba(255, 176, 64, 0.18);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
  font-weight: 900;
  text-align: center;
  padding: 10px 0;
}
.news h3 { margin: 0 0 4px; font-size: 20px; }
.news p { margin: 0; color: var(--muted); }

/* ===== Enter ===== */
.enter {
  position: relative;
  margin: 8px 5vw 48px;
  padding: 28px 28px 86px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  grid-template-areas:
    "copy shelf"
    "poster poster";
  gap: 18px 28px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 211, 106, 0.45);
  box-shadow: 8px 8px 0 #2a0908;
  background: #07080c;
}
.enter-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  opacity: 0.42;
}
.enter-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 12, 0.9) 0%, rgba(7, 8, 12, 0.72) 48%, rgba(7, 8, 12, 0.5) 100%);
  pointer-events: none;
}
.enter-copy, .enter-shelf, .enter-actions { position: relative; z-index: 1; }
.enter-copy { grid-area: copy; }
.enter-shelf {
  grid-area: shelf;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.enter-gift {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 306 / 282;
}
.enter-gift .plate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.enter-gift .gift {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 58%;
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5));
}
.enter h2 {
  margin: 0 0 8px;
  font-size: clamp(32px, 3vw, 42px);
  text-shadow: 3px 3px 0 var(--ember-deep);
}
.enter-copy p { margin: 0; color: var(--muted); max-width: 36em; }
.enter .enter-actions { margin-top: 18px; }

/* ===== Footer ===== */
.foot {
  margin: 0;
  padding: 18px 5vw 28px;
  display: flex;
  justify-content: center;
  background: #07080b;
  border-top: 3px solid var(--ember);
  box-shadow: inset 0 1px 0 rgba(255, 211, 106, 0.65);
  font-weight: 700;
}
.foot-sign {
  position: relative;
  width: min(100%, 560px);
}
.foot-sign img { width: 100%; height: auto; }
.foot-copy {
  position: absolute;
  inset: 18% 12% 22%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.foot p { margin: 0; }
.foot p:first-child { color: #6a2414; font-size: 17px; }
.foot p:last-child { color: #3a2414; font-size: 14px; }
#roster { position: relative; }
.roster-stage {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(100%, 1024px);
  height: auto;
  transform: translateX(-50%);
  opacity: 0.38;
  pointer-events: none;
}
#roster .section-head,
#roster .filters,
#roster .roster { position: relative; z-index: 1; }
.enter-float {
  position: absolute;
  z-index: 2;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45));
  animation: floaty 5.6s ease-in-out infinite;
}
.float-cat { width: 80px; left: 22px; bottom: 10px; }
.float-gems { width: 58px; left: 112px; bottom: 14px; animation-delay: -2.2s; }
.float-bear-b { width: 60px; left: 184px; bottom: 8px; animation-delay: -0.7s; }
.float-gift { width: 66px; right: 108px; bottom: 12px; animation-delay: -1.4s; }
.float-bear-r { width: 60px; right: 28px; bottom: 8px; animation-delay: -3s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

body.layout-desk .panel { display: block; }

/* ===== Phone ===== */
body.layout-phone {
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
body.layout-phone .nav { display: none; }
body.layout-phone .panel { display: none; }
body.layout-phone .panel.is-active { display: block; }
body.layout-phone .hero {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 16px 8px;
  gap: 16px;
}
body.layout-phone .hero-bg { opacity: 0.55; }
body.layout-phone .hero-char {
  position: relative;
  right: auto;
  height: 240px;
  max-width: 100%;
  margin-left: auto;
}
body.layout-phone .fx-ring { display: none; }
body.layout-phone .hero-scrim {
  background: linear-gradient(180deg, rgba(7, 8, 11, 0.2), rgba(7, 8, 11, 0.92));
}
body.layout-phone .vs-board { max-width: none; }
body.layout-phone .promo-strip {
  grid-template-columns: 1fr;
  padding: 8px 16px 20px;
}
body.layout-phone .section { padding: 18px 16px 28px; }
body.layout-phone .mode-grid,
body.layout-phone .roster { grid-template-columns: 1fr; }
body.layout-phone .mode-card--featured { width: min(100%, 459px); aspect-ratio: auto; }
body.layout-phone .youbai { margin-left: 16px; margin-right: 16px; }
body.layout-phone .fate { margin: 28px 0 0; }
body.layout-phone .banner-wall { padding-left: 16px; padding-right: 16px; }
body.layout-phone .cast li,
body.layout-phone .cast img { width: 140px; }
body.layout-phone .cast img { height: 140px; }
body.layout-phone .cast-soon li,
body.layout-phone .cast-soon .portrait-frame { width: 168px; }
body.layout-phone .cast-soon .portrait-frame {
  height: 168px;
  border-width: 16px;
  border-image-width: 16px;
}
body.layout-phone .cast-soon .portrait-frame img {
  width: 100%;
  height: 100%;
}
body.layout-phone .news-link { grid-template-columns: 88px 1fr; }
body.layout-phone .news-link .more { grid-column: 2; }
body.layout-phone .news-head .news-card { width: 72px; }
body.layout-phone .news time { width: auto; padding: 8px 0; }
body.layout-phone .enter.is-active {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 12px 16px 24px;
  padding: 22px 16px;
}
body.layout-phone .enter-shelf { justify-content: center; }
body.layout-phone .enter-actions { flex-direction: row; }
body.layout-phone h1 { font-size: clamp(16px, 4.6vw, 22px); }
body.layout-phone .event-grid { grid-template-columns: 1fr; }
body.layout-phone .foot {
  flex-direction: column;
  padding: 16px 16px 20px;
}
body.layout-phone .enter-float,
body.layout-phone .hero-red,
body.layout-phone .pvp-mark { display: none; }
body.layout-phone .vs-chev { width: 24px; }
body.layout-phone .vs-mark { width: 32px; }
.line-qr {
  position: fixed;
  z-index: 32;
  right: 16px;
  bottom: 16px;
  width: 148px;
  margin: 0;
  padding: 8px 8px 7px;
  text-align: center;
  background: rgba(7, 12, 9, 0.92);
  border: 1px solid rgba(6, 199, 85, 0.72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  animation: line-glow 3.2s ease-in-out infinite;
}
.line-qr img {
  width: 128px;
  height: auto;
  margin: 0 auto;
}
.line-qr span {
  display: block;
  margin-top: 4px;
  color: #bfffd4;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
@keyframes line-glow {
  0%, 100% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(6, 199, 85, 0.18); }
  50% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 0 16px 2px rgba(6, 199, 85, 0.38); }
}
body.layout-phone .line-qr {
  right: 10px;
  bottom: calc(68px + env(safe-area-inset-bottom));
  width: 96px;
  padding: 6px 6px 5px;
}
body.layout-phone .line-qr img { width: 84px; }
body.layout-phone .line-qr span { font-size: 10px; letter-spacing: 0.06em; }
body.layout-phone .dock {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: #12080c;
  border-top: 3px solid var(--ember);
  padding-bottom: env(safe-area-inset-bottom);
}
body.layout-phone .dock button {
  background: transparent;
  border: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  padding: 14px 0;
  cursor: pointer;
}
body.layout-phone .dock button.is-on {
  color: #fff;
  background: var(--ember);
}

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .hero-char { max-width: min(70vw, 520px); opacity: 0.95; }
  .mode-grid { grid-template-columns: 1fr 1fr; }
  .roster { grid-template-columns: 1fr 1fr; }
  .enter {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "shelf"
      "poster";
  }
  .enter-actions { flex-direction: row; }
}

.nav a:focus-visible,
.btn:focus-visible,
.chip:focus-visible,
.dock button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.reel {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-x;
  padding-bottom: 10px;
}
.reel::-webkit-scrollbar { display: none; }
.reel.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
.reel.is-overflow {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 36px), transparent);
}
.reel.is-overflow.can-prev.can-next {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent);
}
.reel.is-overflow.can-prev:not(.can-next) {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 100%);
  mask-image: linear-gradient(90deg, transparent, #000 36px, #000 100%);
}
.reel img { -webkit-user-drag: none; user-select: none; }
.event-grid.reel > img,
.mode-grid.reel > .mode-card,
.roster.reel > li,
.cast.reel > li { scroll-snap-align: start; }
.event-grid.reel > img {
  flex: 0 0 calc((100% - 24px) / 3);
  width: calc((100% - 24px) / 3);
  max-width: none;
}
.event-grid.reel.is-overflow > img {
  flex-basis: calc((100% - 24px) / 3.28);
  width: calc((100% - 24px) / 3.28);
}
.mode-grid.reel { gap: 14px; }
.mode-grid.reel > .mode-card {
  flex: 0 0 calc((100% - 28px) / 3);
  width: calc((100% - 28px) / 3);
}
.mode-grid.reel.is-overflow > .mode-card {
  flex-basis: calc((100% - 28px) / 3.22);
  width: calc((100% - 28px) / 3.22);
}
.roster.reel { gap: 14px; }
.roster.reel > li,
.roster.reel.is-overflow > li {
  flex: 0 0 220px;
  width: 220px;
}
.cast.reel {
  flex-wrap: nowrap;
  justify-content: center;
}
.cast.reel.is-overflow { justify-content: flex-start; }
body.layout-phone .event-grid.reel > img,
body.layout-phone .mode-grid.reel > .mode-card {
  flex-basis: 82%;
  width: 82%;
}
body.layout-phone .roster.reel > li {
  flex-basis: min(220px, 78%);
  width: min(220px, 78%);
}

@keyframes hero-char-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.js-motion .hero-char {
  animation: hero-char-in 0.9s var(--ease-out) 0.08s both;
}
.js-motion .hero-copy > * {
  animation: rise-in 0.62s var(--ease-out) both;
}
.js-motion .hero-copy > *:nth-child(1) { animation-delay: 0.16s; }
.js-motion .hero-copy > *:nth-child(2) { animation-delay: 0.24s; }
.js-motion .hero-copy > *:nth-child(3) { animation-delay: 0.32s; }
.js-motion .hero-copy > *:nth-child(4) { animation-delay: 0.4s; }
.js-motion .hero-copy > *:nth-child(5) { animation-delay: 0.48s; }
.js-motion .hero-copy > *:nth-child(6) { animation-delay: 0.56s; }
.js-motion .vs-board {
  animation: rise-in 0.7s var(--ease-out) 0.42s both;
}
.js-motion .rise {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
  transition-delay: var(--rise-delay, 0ms);
}
.js-motion .rise.is-in {
  opacity: 1;
  transform: none;
}
.portrait img,
.cast li img,
.event-grid img {
  transition: transform 0.5s var(--ease-out), filter 0.5s var(--ease-out);
}
.roster li:hover .portrait img,
.cast li:hover img { transform: scale(1.04); }
.event-grid img:hover { filter: brightness(1.08); }
.mode-bg { transition: transform 0.55s var(--ease-out); }
