@font-face {
  font-family: 'genshin-icon';
  src: url('./fonts/genshin-icon.woff') format('woff'), url('./fonts/genshin-icon.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
.gi-star::before { content: '\45'; }
.gi-hydro::before { content: '\6f'; }
.gi-pyro::before { content: '\4c'; }
.gi-electro::before { content: '\64'; }
.gi-cryo::before { content: '\6e'; }
.gi-geo::before { content: '\67'; }
.gi-anemo::before { content: '\61'; }
.gi-dendro::before { content: '\69'; }
[class^='gi-']::before, [class*=' gi-']::before { font-family: 'genshin-icon' !important; font-style: normal; line-height: 1; }
@font-face {
  font-family: "GI_Global_Web";
  src: url("./fonts/optimized_global_web.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "GI_ZH_Web";
  src: url("./fonts/optimized_zh_web.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "genshin-icon";
  src: url("./fonts/genshin-icon.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

:root {
  --bg: #0b0d14;
  --bg2: #111522;
  --panel: rgba(19, 24, 38, 0.78);
  --line: rgba(210, 190, 140, 0.18);
  --line-soft: rgba(255, 255, 255, 0.07);
  --gold: #e6c477;
  --gold2: #f5e4b0;
  --text: #ece8df;
  --muted: #a8afbd;
  --dim: #707888;
  --blue: #5b8dee;
  --purple: #a06bff;
  --star5: #f0c15a;
  --star4: #b184f5;
  --star3: #6e9bd8;
  --danger: #e97878;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Saira", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  overflow: hidden;
}
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.eyebrow {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.22em;
}

.tool-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(12, 16, 26, 0.65);
  color: #d8dbe2;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.tool-btn:hover { border-color: var(--gold); color: var(--gold2); }
.tool-btn.icon { width: 32px; padding: 0; }

.btn {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 11px;
}
.btn:hover { border-color: var(--gold); }
.btn.primary {
  border-color: rgba(230, 196, 119, 0.8);
  background: linear-gradient(180deg, #e6c477, #b58d3d);
  color: #1a1408;
  font-weight: 700;
}
.btn.ghost { background: rgba(255, 255, 255, 0.035); }
.btn-small { min-height: 28px; padding: 0 10px; font-size: 9px; }

/* ------------------------------------------------------------------ banner page */

.banner-screen {
  background:
    radial-gradient(circle at 15% 10%, rgba(230, 196, 119, 0.08), transparent 34%),
    radial-gradient(circle at 85% 0%, rgba(91, 141, 238, 0.09), transparent 34%),
    var(--bg);
}

.top-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 34px;
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold);
  color: var(--gold);
  transform: rotate(45deg);
  font-size: 17px;
}
.brand-mark + div { display: flex; flex-direction: column; }
.brand b { font-size: 18px; letter-spacing: 0.12em; }
.brand small { color: var(--dim); font-size: 8px; letter-spacing: 0.2em; }
.nav-actions { display: flex; gap: 7px; }

.banner-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 26px 34px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.banner-copy { margin-bottom: 18px; }
.banner-copy h1 { margin: 6px 0 4px; font-size: 30px; letter-spacing: 0.08em; }
.banner-copy p { margin: 0; color: var(--muted); font-size: 11px; }

.banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.banner-card {
  position: relative;
  min-height: 170px;
  padding: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(230, 196, 119, 0.09), transparent 48%),
    linear-gradient(180deg, #1a2033, #0d1019);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  transition: 0.18s ease;
}
.banner-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0.7;
}
.banner-card:hover {
  transform: translateY(-2px);
  border-color: rgba(230, 196, 119, 0.6);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.banner-card.featured { border-color: rgba(230, 196, 119, 0.55); }
.banner-card .b-kicker { color: var(--gold); font-size: 8px; letter-spacing: 0.2em; }
.banner-card .b-title { margin: 8px 0 4px; font-size: 20px; font-weight: 700; }
.banner-card .b-sub { color: var(--muted); font-size: 10px; }
.banner-card .b-meta {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.08em;
}
.banner-avatars {
  position: absolute;
  right: 14px;
  top: 16px;
  display: flex;
}
.banner-avatars img,
.banner-avatars .fallback {
  width: 48px;
  height: 48px;
  margin-left: -12px;
  border: 2px solid #1a2033;
  border-radius: 50%;
  object-fit: cover;
  background: #2a3350;
  color: var(--gold2);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
}

.banner-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 34px;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------------ wish page */

.wish-screen {
  background:
    radial-gradient(ellipse at 50% 8%, rgba(230, 196, 119, 0.14), transparent 38%),
    radial-gradient(ellipse at 50% 100%, rgba(91, 141, 238, 0.12), transparent 46%),
    #0a0c13;
}
.wish-head {
  position: relative;
  flex: 0 0 auto;
  min-height: 104px;
  padding: 20px 34px 12px;
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
}
.back-btn { position: absolute; left: 30px; top: 22px; }
.wish-title h1 { margin: 5px 0 3px; font-size: 27px; letter-spacing: 0.1em; }
.wish-title p { margin: 0; color: var(--muted); font-size: 10px; }
.pity-chip {
  position: absolute;
  right: 32px;
  top: 26px;
  display: flex;
  gap: 12px;
  color: var(--dim);
  font-size: 9px;
}
.pity-chip b { color: var(--gold2); font-weight: 500; }

.wish-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 34px 22px;
  overflow: auto;
}
.wish-banner {
  position: relative;
  width: min(1050px, 92vw);
  min-height: 300px;
  flex: 1 1 auto;
  max-height: 46vh;
  border: 1px solid rgba(230, 196, 119, 0.24);
  background:
    linear-gradient(180deg, rgba(230, 196, 119, 0.12), transparent 44%),
    linear-gradient(120deg, #151b2b, #0b0e17 60%);
  overflow: hidden;
}
.wish-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(230, 196, 119, 0.06) 79px 80px),
    radial-gradient(circle at 72% 42%, rgba(230, 196, 119, 0.2), transparent 48%);
  pointer-events: none;
}
.wish-banner-glow {
  position: absolute;
  left: 50%;
  bottom: -50%;
  width: 60%;
  height: 90%;
  transform: translateX(-50%);
  /* 多段渐变模拟原 blur(20px) 的弥散光晕，避免大面积滤镜离屏合成 */
  background: radial-gradient(ellipse, rgba(230, 196, 119, 0.22) 0%, rgba(230, 196, 119, 0.12) 34%, rgba(230, 196, 119, 0.04) 60%, transparent 100%);
}
.wish-featured {
  position: absolute;
  right: 7%;
  top: 8%;
  width: 54%;
  height: 86%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
}
.featured-card {
  position: relative;
  width: 150px;
  height: 90%;
  max-height: 300px;
  transform: skewX(-4deg);
  border: 1px solid rgba(230, 196, 119, 0.4);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}
.featured-card:nth-child(2) { transform: translateY(12px) skewX(4deg); }
.featured-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-card .fallback {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(160deg, #263152, #121723);
  color: var(--gold2); font-size: 42px; font-weight: 800;
}
.featured-card span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  font-size: 13px; font-weight: 700; text-align: center;
}
.wish-banner-copy {
  position: absolute;
  left: 6%;
  top: 22%;
  max-width: 38%;
}
.wish-banner-copy h2 { margin: 7px 0 6px; font-size: 28px; letter-spacing: 0.12em; }
.wish-banner-copy p { margin: 0; color: var(--muted); font-size: 11px; }

.wish-rates {
  width: min(1050px, 92vw);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.rate-card {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
}
.rate-card b { font-size: 15px; }
.rate-card span { font-size: 11px; }
.rate-card small { margin-left: auto; color: var(--dim); font-size: 8px; }
.rate-five b { color: var(--star5); }
.rate-four b { color: var(--star4); }
.rate-three b { color: var(--star3); }

.wish-actions { display: flex; gap: 12px; margin-top: 16px; }
.wish-btn {
  min-width: 210px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: 0.16s ease;
}
.wish-btn span { font-size: 15px; font-weight: 700; letter-spacing: 0.06em; }
.wish-btn small { color: var(--dim); font-size: 9px; }
.wish-btn--single:hover { border-color: var(--gold); }
.wish-btn--ten {
  border-color: rgba(230, 196, 119, 0.65);
  background: linear-gradient(180deg, rgba(230, 196, 119, 0.18), rgba(230, 196, 119, 0.06));
}
.wish-btn--ten:hover { background: rgba(230, 196, 119, 0.24); }
.wish-note { color: var(--dim); font-size: 9px; margin: 12px 0 0; }

/* ------------------------------------------------------------------ wish animation */

.wish-animation {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  background: #fff;
}
.wish-animation video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 105%;
  height: 105%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  background: #fff;
  display: none;
}
.wish-animation.playing video { display: block; }
.meteor-flash {
  position: absolute;
  inset: -20%;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 45%, #fff 0, #cfe8ff 8%, rgba(150, 205, 255, 0.5) 18%, transparent 46%),
    conic-gradient(from 45deg, transparent 0 40%, rgba(255, 255, 255, 0.9) 47%, transparent 54%, rgba(255, 255, 255, 0.8) 59%, transparent 66%);
  opacity: 0;
  pointer-events: none;
}
.wish-animation.flash .meteor-flash {
  animation: meteorFlash 1.05s ease-out forwards;
}
@keyframes meteorFlash {
  0% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  18% { opacity: 1; transform: scale(1.2) rotate(8deg); }
  70% { opacity: 0.85; transform: scale(1.5) rotate(14deg); }
  100% { opacity: 0; transform: scale(2.4) rotate(20deg); }
}
.anim-splash {
  position: absolute;
  inset: 0;
  display: none;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.45) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.35) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 72%, rgba(255, 255, 255, 0.3) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 62%, rgba(255, 255, 255, 0.4) 0 1px, transparent 2px),
    radial-gradient(ellipse at 50% 42%, rgba(96, 118, 190, 0.35), transparent 62%),
    radial-gradient(ellipse at 50% 100%, rgba(120, 90, 200, 0.28), transparent 58%),
    linear-gradient(180deg, rgba(6, 9, 20, 0.55), rgba(4, 6, 12, 0.88)),
    url("./img/bg/splash-background.webp") center / cover no-repeat,
    #05070f;
}
.anim-splash.show { display: block; }
.anim-art-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.anim-art {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: brightness(0);
  opacity: 0;
  animation: splashart 1.5s forwards 1;
}
.anim-art img {
  position: relative;
  z-index: 1;
  width: min(30vh, 22vw);
  height: min(78vh, 62vw);
  object-fit: cover;
  object-position: center;
  display: block;
  border: 2px solid var(--anim-tone, rgba(245, 228, 176, 0.8));
  background: linear-gradient(160deg, #263152, #11151f);
  box-shadow: 0 0 60px var(--anim-tone, rgba(240, 193, 90, 0.35));
  clip-path: polygon(0 0, 100% 0, 100% 90%, 90% 100%, 0 100%);
}
.anim-fallback {
  position: absolute;
  z-index: 0;
  width: min(30vh, 22vw);
  height: min(78vh, 62vw);
  display: grid;
  place-items: center;
  border: 2px solid var(--anim-tone, rgba(245, 228, 176, 0.8));
  background: linear-gradient(160deg, #263152, #11151f);
  color: var(--anim-tone, #f5e4b0);
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 900;
  box-shadow: 0 0 60px var(--anim-tone, rgba(240, 193, 90, 0.35));
  clip-path: polygon(0 0, 100% 0, 100% 90%, 90% 100%, 0 100%);
}
.anim-orbs {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  border-radius: 100%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  animation: orbsIn forwards 1;
}
.anim-orbs.in1 { width: 100vmax; height: 100vmax; animation-duration: 1s; }
.anim-orbs.in2 { width: 80vmax; height: 80vmax; animation-duration: 1.2s; }
.anim-orbs.in3 { width: 40vmax; height: 40vmax; animation-duration: 1.1s; }
.anim-orbs.in4 { width: 70vmax; height: 70vmax; animation-duration: 0.75s; }
.anim-orbs.in5 {
  position: fixed;
  top: auto;
  bottom: 0;
  left: 50%;
  width: 100vw;
  height: 100vw;
  transform: translateX(-50%) scale(0);
  opacity: 1;
  animation: orbs2 forwards 1s 1;
}
.anim-splash.star5 .in1 { background-color: rgb(254 133 63 / 5%); box-shadow: 0 0 50px rgb(254 133 63 / 10%), inset 0 0 70px rgb(254 133 63 / 10%); }
.anim-splash.star5 .in2 { box-shadow: 0 0 50px rgb(253 148 48 / 30%), inset 0 0 70px rgb(253 148 48 / 30%); }
.anim-splash.star5 .in3 { background-image: radial-gradient(rgba(251, 193, 60, 1), rgb(251, 193, 60, 0)); box-shadow: 0 0 50px rgb(251 193 60 / 50%); }
.anim-splash.star5 .in4 { box-shadow: 0 0 30px rgb(253 148 48 / 10%), inset 0 0 30px rgb(253 148 48 / 10%); }
.anim-splash.star5 .in5 { background-image: radial-gradient(rgba(253, 148, 48, 0.5), rgb(253, 148, 48, 0), rgba(253, 148, 48, 0)); }
.anim-splash.star4 .in1 { background-color: rgba(241, 143, 223, 0.05); box-shadow: 0 0 50px rgba(126, 20, 158, 0.1), inset 0 0 70px rgba(159, 51, 241, 0.1); }
.anim-splash.star4 .in2 { box-shadow: 0 0 50px rgb(113 34 221 / 30%), inset 0 0 70px rgb(113 34 221 / 30%); }
.anim-splash.star4 .in3 { background-image: radial-gradient(rgba(156, 71, 218, 1), rgb(180, 47, 248, 0)); box-shadow: 0 0 50px rgb(180 47 248 / 50%); }
.anim-splash.star4 .in4 { box-shadow: 0 0 30px rgb(113 34 221 / 10%), inset 0 0 30px rgb(113 34 221 / 10%); }
.anim-splash.star4 .in5 { background-image: radial-gradient(rgba(156, 71, 218, 0.5), rgb(156, 71, 218, 0), rgba(156, 71, 218, 0)); }
.anim-splash.star3 .in1 { background-color: rgba(255, 255, 255, 0.05); box-shadow: 0 0 50px rgba(255, 255, 255, 0.1), inset 0 0 70px rgba(247, 237, 231, 0.1); }
.anim-splash.star3 .in2 { box-shadow: 0 0 50px rgb(85 93 255 / 30%), inset 0 0 70px rgb(85 93 255 / 30%); }
.anim-splash.star3 .in3 { background-image: radial-gradient(rgba(99, 124, 205, 1), rgba(99, 124, 205, 0)); box-shadow: 0 0 50px rgb(106 128 254 / 50%); }
.anim-splash.star3 .in4 { box-shadow: 0 0 30px rgb(85 93 255 / 10%), inset 0 0 30px rgb(85 93 255 / 10%); }
.anim-splash.star3 .in5 { background-image: radial-gradient(rgba(99, 124, 205, 0.5), rgba(99, 124, 205, 0), rgba(99, 124, 205, 0)); }
@keyframes orbsIn {
  0% { transform: translate(-50%, -50%) scale(0); }
  90% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
@keyframes orbs2 {
  0% { transform: translateX(-50%) scale(0); }
  90% { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 0; }
}
.anim-info {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  width: 1200px;
  max-width: 92%;
  z-index: 3;
  pointer-events: none;
}
.anim-icon {
  flex: 0 0 auto;
  width: clamp(34px, 3.6vw, 56px);
  height: clamp(34px, 3.6vw, 56px);
  margin-right: 14px;
  display: grid;
  place-items: center;
  color: var(--anim-tone, #f7cf33);
  opacity: 0;
  animation: revealIcon 1.3s 1.2s forwards;
}
.anim-icon { font-size: clamp(30px, 3.2vw, 50px); line-height: 1; }
.anim-icon .gi-icon-glyph { font-size: 1em; filter: drop-shadow(0 0 8px currentColor); }
.anim-text { width: 100%; }
.anim-name {
  max-width: 46%;
  color: #fff;
  font-size: clamp(26px, 3vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  -webkit-text-stroke: 0.04rem #000;
  filter: drop-shadow(0 0 0.25rem rgba(0, 0, 0, 0.5));
  opacity: 0;
  transform: translateX(20px);
  animation: revealName 0.8s 1.3s forwards;
}
.anim-stars {
  margin-top: 6px;
  filter: drop-shadow(0 0 0.25rem rgba(0, 0, 0, 0.5));
}
.anim-stars i {
  display: inline-block;
  color: #f7cf33;
  font-style: normal;
  font-size: clamp(18px, 1.9vw, 26px);
  opacity: 0;
  transform: scale(5);
  animation: revealStar 0.4s forwards;
}
.anim-stars i svg { display: block; width: 1em; height: 1em; fill: currentColor; filter: drop-shadow(0 0 4px rgba(247,207,51,.65)); }
@keyframes revealIcon { from { opacity: 0; } to { opacity: 1; } }
.anim-sub {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0;
  animation: revealName 0.8s 1.8s forwards;
}
@media (max-width: 760px) {
  .anim-art-wrap { flex-direction: column; gap: 14px; }
  .anim-info { max-width: 88vw; text-align: center; }
  .anim-art { width: min(62vw, 34vh); height: min(64vw, 46vh); }
}
.anim-skip {
  position: absolute;
  right: 26px;
  top: 22px;
  z-index: 4;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 11px;
}
.anim-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  text-align: center;
  letter-spacing: 0.16em;
}
.anim-burst,
.anim-flash {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  opacity: 0;
}
.anim-burst {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 48%, #fff 0, var(--burst-tone, #f0c15a) 11%, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 0.92) 100%),
    conic-gradient(from 40deg, transparent 0 40%, rgba(255, 255, 255, 0.5) 45%, transparent 50%, rgba(255, 255, 255, 0.35) 56%, transparent 62%);
}
.anim-flash {
  z-index: 4;
  background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.96) 0, rgba(255, 255, 255, 0.6) 24%, rgba(255, 255, 255, 0) 60%);
}
.anim-splash.silhouette .anim-art {
  animation: splashartSilhouette 0.64s ease-out forwards;
  box-shadow: 0 0 90px var(--burst-tone, #f0c15a), 0 0 26px rgba(255, 255, 255, 0.35);
}
.anim-splash.silhouette .anim-info { opacity: 0; }
.anim-splash.crack .anim-art { animation: splashartRise 0.55s ease-out forwards 1; }
.anim-splash.settled .anim-art {
  animation: none;
  opacity: 1;
  filter: brightness(1);
  transform: scale(1) translate(2%, 0);
}
@keyframes splashartSilhouette {
  0% { transform: scale(1.2); filter: brightness(0); opacity: 0; }
  100% { transform: scale(1.06); filter: brightness(0); opacity: 1; }
}
@keyframes splashartRise {
  0% { transform: scale(1.06); filter: brightness(0); opacity: 1; }
  55% { transform: scale(1); filter: brightness(1); opacity: 1; }
  100% { transform: scale(1) translate(2%, 0); filter: brightness(1); opacity: 1; }
}
.anim-splash.transitioning::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000;
  pointer-events: none;
  animation: splashDark 0.25s ease-in forwards;
}
.anim-splash.burst .anim-burst { animation: splashBurst 1.4s ease-out forwards; }
.anim-splash.flash .anim-flash,
.anim-splash.crack .anim-flash { animation: splashFlash 0.45s ease-out forwards; }
@keyframes splashDark {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes splashBurst {
  0% { opacity: 0; transform: scale(0.6) rotate(0deg); }
  16% { opacity: 1; transform: scale(1.02) rotate(8deg); }
  68% { opacity: 1; transform: scale(1.12) rotate(16deg); }
  100% { opacity: 0; transform: scale(1.45) rotate(22deg); }
}
@keyframes splashartBurst {
  0% { transform: scale(1.9); filter: brightness(0); opacity: 0; }
  30% { transform: scale(1.15); filter: brightness(0.18); opacity: 0.6; }
  52% { transform: scale(1); filter: brightness(1); opacity: 1; }
  100% { transform: scale(1) translate(2%, 0); filter: brightness(1); opacity: 1; }
}
@keyframes splashFlash {
  0% { opacity: 0; }
  26% { opacity: 0.85; }
  100% { opacity: 0; }
}
.anim-orbs {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100vmax;
  height: 100vmax;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 193, 90, 0.34), transparent 65%);
  opacity: 0;
  animation: orbsIn 1.2s forwards 1;
}
.anim-orbs.star4 { background: radial-gradient(circle, rgba(177, 132, 245, 0.34), transparent 65%); }
.anim-orbs.star3 { background: radial-gradient(circle, rgba(110, 155, 216, 0.3), transparent 65%); }
@keyframes splashart {
  0% { transform: scale(5) translate(0, -5%); filter: brightness(0); opacity: 0; }
  20% { transform: scale(1); filter: brightness(0); opacity: 0; }
  75% { transform: scale(1); filter: brightness(0); opacity: 0; }
  95% { transform: scale(1) translate(2%, 0); filter: brightness(1); opacity: 1; }
  100% { transform: scale(1) translate(2%, 0); filter: brightness(1); opacity: 1; }
}
@keyframes revealName {
  to { transform: translateY(0); opacity: 1; }
}
@keyframes revealStar {
  to { transform: scale(1); opacity: 1; }
}
@keyframes orbsIn {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  30% { opacity: 1; }
  90% { opacity: 0.75; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

/* ------------------------------------------------------------------ result */

.result-screen {
  background-color: #05070f;
  background-image:
    linear-gradient(180deg, rgba(5, 7, 15, 0.34), rgba(5, 7, 15, 0.62)),
    radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.85) 0 1.5px, transparent 3px),
    radial-gradient(circle at 57% 26%, rgba(255, 255, 255, 0.7) 0 1.5px, transparent 3px),
    radial-gradient(circle at 92% 34%, rgba(255, 255, 255, 0.65) 0 1.5px, transparent 3px),
    radial-gradient(circle at 47% 84%, rgba(255, 255, 255, 0.6) 0 1.5px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(120, 150, 235, 0.05) 0 2px, transparent 2px 90px),
    radial-gradient(ellipse 70% 48% at 50% 6%, rgba(140, 165, 245, 0.22), transparent 70%),
    url("./img/bg/constellation.webp");
  background-size: auto, auto, auto, auto, auto, auto, auto, cover;
  background-position: center;
  background-repeat: no-repeat;
}
.result-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 34px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.result-head h1 { margin: 5px 0 2px; font-size: 26px; }
.result-head p { margin: 0; color: var(--muted); font-size: 10px; }
.result-grid {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 24px;
  overflow-x: auto;
  overflow-y: hidden;
}
.result-cell {
  position: relative;
  flex: 0 0 auto;
  width: clamp(78px, 8.6vw, 126px);
  height: min(64vh, 470px);
  contain: layout;
  animation: resultSpread 1.15s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}
.result-cell::before,
.result-cell::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 74%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}
/* 柔光光柱：原为 filter: blur(9px) + 渐变。现改为「预烘焙位图 + 独立变换属性」。
   - 位图（img/flame-*.png）由同一份渐变声明离线烘焙一次（2x 超采样），边缘羽化与
     原 blur 视觉等价，但不需要每帧做滤镜模糊 + 离屏合成；
   - 动画改用独立属性 translate/scale/rotate（不写 transform），Chromium 可直接
     合成预栅格化纹理，避免「渐变 + transform」每帧重新栅格化。 */
.result-cell::before {
  bottom: 100%;
  width: 62%;
  height: 44px;
  background-image: url("img/flame-three.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0.85;
  transform: none;
  translate: -50% 0;
  transform-origin: 50% 100%;
  animation: flameGrow 0.7s ease-out both, flameFlow 2.6s 0.7s ease-in-out infinite alternate;
}
/* 底部径向光晕：同样用多段渐变替代 blur(10px) */
.result-cell::after {
  top: 100%;
  width: 96%;
  height: 52px;
  background: radial-gradient(ellipse 50% 66% at 50% 0%, var(--tone) 0%, color-mix(in srgb, var(--tone) 50%, transparent) 40%, transparent 100%);
  opacity: 0.7;
}
.result-cell.q-four::before {
  width: 66%;
  height: 150px;
  background-image: url("img/flame-four.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0.95;
}
.result-cell.q-five::before {
  width: 74%;
  height: 210px;
  background-image: url("img/flame-five.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 1;
}
.result-cell.q-five::after {
  width: 100%;
  height: 66px;
  background: radial-gradient(ellipse 52% 70% at 50% 0%, #f0c15a 0%, color-mix(in srgb, #f0c15a 50%, transparent) 40%, transparent 100%);
  opacity: 0.9;
}
/* 入场闪光层：替代 resultSpread 关键帧里的 filter: brightness() 脉冲。
   叠加层只动 opacity，不触发卡片重绘，观感与原来的高光脉冲一致。 */
.result-pulse {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 74% 64% at 50% 42%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.4) 56%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  will-change: opacity;
  animation: resultPulse 1.15s cubic-bezier(0.2, 0.75, 0.25, 1) both;
  animation-delay: var(--delay, 0s);
}
@keyframes resultPulse {
  0% { opacity: 0; }
  55% { opacity: 0; }
  86% { opacity: 0.44; }
  100% { opacity: 0; }
}
.result-card {
  position: relative;
  width: 100%;
  height: 100%;
  padding-top: 26px;
  clip-path: polygon(50% 0, 86% 5%, 100% 12%, 100% 92%, 50% 100%, 0 92%, 0 12%, 14% 5%);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--tone);
  background:
    linear-gradient(180deg, rgba(236, 248, 252, 0.96) 0%, rgba(206, 230, 242, 0.93) 42%, rgba(170, 203, 222, 0.9) 100%);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.75), 0 0 18px var(--tone-glow, rgba(255, 255, 255, 0.25));
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
}
/* 只动 transform/opacity：原来的 filter: brightness() 脉冲已移到 .result-pulse 叠加层 */
@keyframes resultSpread {
  0% { opacity: 0; transform: translateY(18px) scale(0.96); }
  55% { opacity: 1; transform: translateY(0) scale(1); }
  88% { opacity: 1; transform: none; }
  100% { opacity: 1; transform: none; }
}
.result-card.q-five {
  border-color: #f5c95c;
  box-shadow: inset 0 0 26px rgba(255, 240, 200, 0.9), 0 0 26px rgba(240, 193, 90, 0.6);
  background: linear-gradient(180deg, rgba(255, 248, 219, 0.97) 0%, rgba(248, 220, 160, 0.95) 42%, rgba(236, 190, 112, 0.93) 100%);
}
.result-card.q-four {
  border-color: #b98cf8;
  box-shadow: inset 0 0 24px rgba(240, 232, 255, 0.9), 0 0 20px rgba(177, 132, 245, 0.5);
  background: linear-gradient(180deg, rgba(246, 240, 255, 0.97) 0%, rgba(224, 210, 250, 0.95) 42%, rgba(200, 180, 240, 0.93) 100%);
}
.result-card::before {
  content: '';
  position: absolute;
  inset: 5px;
  clip-path: polygon(50% 0, 86% 5%, 100% 12%, 100% 92%, 50% 100%, 0 92%, 0 12%, 14% 5%);
  border: 1px solid rgba(90, 130, 160, 0.45);
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 2;
}
.result-card::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  background: #fff;
  opacity: 0.9;
  z-index: 3;
}

  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(240, 193, 90, 0.5), transparent);
  pointer-events: none;
}
.result-card:hover { border-color: #fff; }
.result-photo {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #fff, var(--tone) 82%);
}
.result-fallback {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%);
  color: #16202e;
  font-size: clamp(16px, 1.7vw, 24px);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.85);
  padding: 8px;
}
.result-stars { margin-top: 6px; color: var(--tone); font-size: clamp(10px, 1vw, 13px); letter-spacing: 0.1em; text-align: center; }
.result-name { margin-top: 2px; padding: 0 6px 10px; font-size: 10px; font-weight: 600; color: rgba(20, 32, 46, 0.85); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-sub { display: none; }
.result-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 34px 18px;
  border-top: 1px solid var(--line-soft);
}
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ inventory */

.inventory-screen { background: #090b11; }
.inv-head {
  position: relative;
  flex: 0 0 auto;
  padding: 24px 34px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.inv-head .tool-btn { position: absolute; left: 34px; top: 26px; }
.inv-head > div:nth-child(2) { padding-left: 112px; }
.inv-head h1 { margin: 5px 0 3px; font-size: 28px; }
.inv-head p { margin: 0; color: var(--muted); font-size: 10px; }
.inv-total { position: absolute; right: 34px; top: 30px; color: var(--dim); font-size: 10px; }
.inv-total b { color: var(--gold); font-size: 15px; }
.inv-main { flex: 1 1 auto; min-height: 0; padding: 14px 34px 24px; overflow: auto; }
.inv-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); }
.inv-tab {
  padding: 9px 15px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}
.inv-tab.active { color: var(--gold2); border-color: var(--gold); }
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 9px;
  margin-top: 14px;
}
.inv-card {
  position: relative;
  padding: 8px;
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 50% 0%, var(--tone-glow), transparent 62%),
    rgba(255, 255, 255, 0.025);
  cursor: pointer;
  overflow: hidden;
}
.inv-card:hover { border-color: var(--tone); }
.inv-photo { width: 100%; height: 116px; object-fit: cover; display: block; }
.inv-fallback {
  width: 100%; height: 116px; display: grid; place-items: center;
  background: linear-gradient(135deg, #fff, var(--tone) 82%);
  color: #17120a; font-size: 34px; font-weight: 900;
}
.inv-stars { margin-top: 6px; color: var(--tone); font-size: 11px; letter-spacing: 0.1em; }
.inv-name { font-size: 12px; font-weight: 700; margin-top: 1px; }
.inv-meta { color: var(--dim); font-size: 8px; margin-top: 1px; }
.inv-new {
  position: absolute; left: 7px; top: 7px; z-index: 2;
  padding: 3px 6px; background: #1e9bd7; color: #fff;
  font-size: 8px; letter-spacing: 0.08em;
}

/* ------------------------------------------------------------------ inspect */

.inspect-screen {
  z-index: 20;
  background: radial-gradient(circle at 50% 20%, rgba(230, 196, 119, 0.08), transparent 50%), #06070b;
}
.inspect-head {
  position: relative;
  flex: 0 0 auto;
  padding: 22px 34px 8px;
  text-align: center;
}
.inspect-kicker { color: var(--gold); font-size: 9px; letter-spacing: 0.18em; }
.inspect-head h1 { margin: 4px 0 2px; font-size: 28px; letter-spacing: 0.08em; }
.inspect-sub { color: var(--muted); font-size: 10px; }
.inspect-progress { position: absolute; right: 34px; top: 24px; color: var(--dim); font-size: 9px; }
.inspect-bar { width: min(360px, 62vw); height: 4px; margin: 9px auto 0; background: rgba(255, 255, 255, 0.14); }
.inspect-bar i { display: block; width: 0; height: 100%; background: #2f7ed8; transition: width 0.25s ease; }
.inspect-stage { flex: 1 1 auto; min-height: 0; position: relative; }
#cardCanvas { width: 100%; height: 100%; display: block; }
.inspect-hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: var(--dim); font-size: 8px; }
.inspect-nav {
  position: absolute; z-index: 5; top: 45%;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 150px; padding: 8px 4px; border: 0; background: transparent;
  color: #c8ced5; font-size: 52px; font-weight: 200; opacity: 0.85;
}
.inspect-nav:hover { color: #fff; opacity: 1; }
.inspect-nav small { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
.inspect-nav--prev { left: 20px; }
.inspect-nav--next { right: 20px; }
.inspect-nav:disabled { opacity: 0.15; cursor: default; }
.inspect-bottom {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 34px 16px; border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: 9px;
}

/* ------------------------------------------------------------------ modal/config */

.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
}
.modal-panel {
  width: min(980px, 94vw);
  max-height: 88vh;
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  background: #10141f;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  scrollbar-width: thin;
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; }
.modal-head h2 { margin: 5px 0 0; font-size: 22px; }
.modal-hint { margin: 8px 0 14px; color: var(--dim); font-size: 9px; }

.github-config, .special-config {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(230, 196, 119, 0.22);
  background: rgba(230, 196, 119, 0.035);
}
.config-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--gold); font-size: 10px; }
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.config-grid label, .special-config label, .github-config label {
  display: flex; flex-direction: column; gap: 4px;
  color: var(--muted); font-size: 9px; letter-spacing: 0.05em;
}
.config-grid input, .special-config input, .github-config input {
  height: 30px; padding: 0 8px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text); font-size: 10px; outline: none;
}
.config-grid input:focus, .special-config input:focus, .github-config input:focus { border-color: var(--gold); }
.span2 { grid-column: 1 / -1; }
.special-config { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.special-config .check { flex-direction: row; align-items: center; gap: 7px; color: var(--gold2); }
.special-config .check input { height: auto; accent-color: var(--gold); }
.mirror-status { color: var(--dim); font-size: 9px; line-height: 1.6; }
.mirror-status .ok { color: #69d39a; }
.mirror-status .fail { color: var(--danger); }

.editor-actions { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; }
.editor-actions span { margin-left: auto; color: var(--dim); font-size: 9px; }
.file-label { display: inline-flex; align-items: center; }
.people-editor {
  max-height: 34vh; overflow: auto;
  border: 1px solid var(--line-soft);
  scrollbar-width: thin;
}
.person-row {
  display: grid;
  grid-template-columns: 42px 1.3fr 36px 2fr 28px;
  gap: 7px;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-soft);
}
.person-row:last-child { border-bottom: 0; }
.person-photo {
  position: relative; width: 36px; height: 36px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #fff, var(--tone) 82%);
  color: #17120a; font-weight: 800; font-size: 13px;
  cursor: pointer; overflow: hidden;
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.person-row input {
  height: 28px; padding: 0 7px; border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.25); color: var(--text); font-size: 10px;
}
.person-color { width: 28px; height: 24px; padding: 0; border: 0; background: transparent; }
.person-remove { border: 0; background: transparent; color: var(--dim); font-size: 14px; }
.person-remove:hover { color: var(--danger); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  transform: translate(-50%, 20px);
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: rgba(16, 20, 31, 0.96);
  color: var(--text); font-size: 10px;
  opacity: 0; pointer-events: none; transition: 0.2s ease;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.empty { padding: 30px 0; color: var(--dim); font-size: 10px; text-align: center; }

@media (max-width: 900px) {
  .top-nav { padding: 12px 16px; }
  .banner-main, .wish-main, .inv-main { padding-left: 16px; padding-right: 16px; }
  .banner-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .banner-card { min-height: 140px; }
  .banner-avatars { display: none; }
  .banner-footer { padding: 10px 16px; flex-direction: column; gap: 4px; }
  .wish-head { min-height: 94px; padding: 14px 16px 10px; }
  .back-btn { left: 12px; top: 12px; }
  .pity-chip { position: static; margin-top: 7px; justify-content: center; }
  .wish-title h1 { font-size: 22px; }
  .wish-banner { min-height: 250px; max-height: 40vh; }
  .wish-featured { width: 62%; right: 3%; }
  .featured-card { width: 110px; }
  .wish-banner-copy { left: 5%; max-width: 34%; }
  .wish-banner-copy h2 { font-size: 22px; }
  .wish-rates { grid-template-columns: 1fr; }
  .wish-actions { width: 100%; }
  .wish-btn { flex: 1; min-width: 0; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 16px; }
  .result-head, .result-actions { padding-left: 16px; padding-right: 16px; }
  .result-actions { flex-wrap: wrap; }
  .inv-head { padding: 16px; }
  .inv-head .tool-btn { left: 16px; top: 18px; }
  .inv-head > div:nth-child(2) { padding-left: 100px; }
  .inv-total { right: 16px; top: 22px; }
  .inv-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .config-grid, .special-config { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .inspect-nav { width: 80px; font-size: 38px; }
  .inspect-nav small { display: none; }
}
/* ------------------------------------------------------------------ Genshin loading / cursor / theme */

body,
button,
a,
label,
.banner-card,
.inv-card,
.result-card,
.inspect-nav,
.case-tile {
  cursor: url("./anim/cursor.png") 4 4, auto;
}
input,
textarea {
  cursor: text;
}
body {
  font-family: "GI_Global_Web", "GI_ZH_Web", "Microsoft YaHei", sans-serif;
}
h1, h2, h3, .b-title, .wish-title h1, .inv-head h1, .result-head h1 {
  font-family: "GI_ZH_Web", "GI_Global_Web", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  letter-spacing: 0.12em;
}
.brand-logo {
  width: 96px;
  height: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(240, 193, 90, 0.12), transparent 28%),
    #f7f4ed;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}
.loading-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: min(440px, 72vw);
}
.loading-logo img {
  width: min(190px, 42vw);
  height: auto;
  opacity: 0.62;
  filter: brightness(0) sepia(0.6) saturate(0.7);
}
.loading-elements {
  display: flex;
  gap: 8px;
  margin: 30px 0 12px;
  color: #b9a882;
  font-size: 18px;
}
.loading-elements i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(139, 119, 82, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}
.loading-elements .gi-pyro { color: #e46b52; }
.loading-elements .gi-hydro { color: #4b8fd8; }
.loading-elements .gi-anemo { color: #63b89a; }
.loading-elements .gi-electro { color: #9a6bd1; }
.loading-elements .gi-dendro { color: #7eaa4c; }
.loading-elements .gi-cryo { color: #76c2d8; }
.loading-elements .gi-geo { color: #c59a43; }
.loading-bar {
  position: relative;
  width: min(330px, 66vw);
  height: 3px;
  overflow: hidden;
  background: #ded7ca;
}
.loading-bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: #8e7b59;
  transition: width 0.25s ease;
}
.loading-text {
  min-height: 18px;
  margin-top: 12px;
  color: #8d806a;
  font-family: "GI_Global_Web", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
}
.loading-text::after {
  content: "";
  animation: loadingDots 1.6s steps(4, end) infinite;
}
@keyframes loadingDots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

/* Parchment + gold trim */
.banner-screen,
.wish-screen {
  background:
    linear-gradient(180deg, rgba(8, 12, 20, 0.52), rgba(8, 12, 20, 0.68)),
    url("./img/wish-background.webp") center / cover fixed,
    #111722;
}
.top-nav,
.wish-head {
  background: linear-gradient(180deg, rgba(11, 15, 24, 0.92), rgba(11, 15, 24, 0.62));
  border-bottom-color: rgba(231, 204, 142, 0.3);
}
.banner-copy h1,
.wish-title h1 {
  color: #f4ead2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}
.banner-card {
  border: 1px solid rgba(231, 204, 142, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 48%),
    linear-gradient(180deg, #f4ecdd, #d9ccb4);
  color: #3d3427;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.25);
}
.banner-card::after {
  background: linear-gradient(90deg, #a98b4e, transparent 82%);
}
.banner-card:hover {
  border-color: #f4d98c;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 20px rgba(240, 193, 90, 0.2);
}
.banner-card .b-kicker { color: #8d6d32; }
.banner-card .b-title { color: #3d3427; }
.banner-card .b-sub { color: #71614a; }
.banner-card .b-meta { color: #8f8068; }
.banner-avatars img,
.banner-avatars .fallback {
  border-color: #f4ecdd;
}
.btn {
  border-color: rgba(141, 119, 78, 0.65);
  background: linear-gradient(180deg, #f6f0e4, #d9ccb4);
  color: #3d3427;
}
.btn:hover {
  border-color: #a98b4e;
  box-shadow: 0 0 12px rgba(240, 193, 90, 0.18);
}
.btn.primary {
  border-color: #a98b4e;
  background: linear-gradient(180deg, #f1d48d, #c99d48);
  color: #2b210f;
}
.tool-btn {
  border-color: rgba(231, 204, 142, 0.5);
  background: rgba(244, 236, 221, 0.9);
  color: #3d3427;
}
.tool-btn:hover {
  border-color: #f1d48d;
  color: #6b5427;
}
.wish-banner {
  border-color: rgba(231, 204, 142, 0.5);
  background:
    linear-gradient(90deg, rgba(10, 14, 22, 0.28), rgba(10, 14, 22, 0.08)),
    url("./img/wish-background.webp") center / cover;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.35);
}
.featured-card {
  border-color: rgba(231, 204, 142, 0.8);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 22px rgba(240, 193, 90, 0.16);
}
.wish-btn {
  border-color: rgba(231, 204, 142, 0.5);
  background: rgba(244, 236, 221, 0.9);
  color: #3d3427;
}
.wish-btn small { color: #7c6d53; }
.wish-btn--ten {
  border-color: #a98b4e;
  background: linear-gradient(180deg, #f1d48d, #c99d48);
  color: #2b210f;
}
.wish-rates .rate-card {
  border-color: rgba(231, 204, 142, 0.35);
  background: rgba(11, 15, 24, 0.72);
}
.inventory-screen {
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 193, 90, 0.08), transparent 40%),
    #0b0f17;
}
.inv-head,
.result-head {
  background: rgba(11, 15, 24, 0.65);
  border-bottom-color: rgba(231, 204, 142, 0.25);
}
.inv-tab.active { color: #f1d48d; border-color: #f1d48d; }
.inv-card {
  border-color: rgba(231, 204, 142, 0.22);
  background:
    radial-gradient(circle at 50% 0%, var(--tone-glow), transparent 62%),
    rgba(244, 236, 221, 0.06);
}
.inv-card:hover { border-color: #f1d48d; }
.modal-panel {
  border-color: rgba(231, 204, 142, 0.45);
  background: #f4ecdd;
  color: #3d3427;
}
.modal-panel .eyebrow { color: #8d6d32; }
.modal-panel .modal-hint,
.modal-panel .mirror-status,
.modal-panel .github-config label,
.modal-panel .special-config label,
.modal-panel .config-grid label,
.modal-panel .editor-actions span {
  color: #71614a;
}
.modal-panel .config-grid input,
.modal-panel .special-config input,
.modal-panel .github-config input {
  border-color: rgba(141, 119, 78, 0.3);
  background: rgba(255, 255, 255, 0.62);
  color: #3d3427;
}
.modal-panel .github-config,
.modal-panel .special-config {
  border-color: rgba(141, 119, 78, 0.28);
  background: rgba(255, 255, 255, 0.32);
}
.modal-panel .config-head,
.modal-panel .special-config .check { color: #8d6d32; }
.modal-panel .people-editor { border-color: rgba(141, 119, 78, 0.25); }
.modal-panel .person-row { border-bottom-color: rgba(141, 119, 78, 0.18); }
.modal-panel .person-row input {
  border-color: rgba(141, 119, 78, 0.28);
  background: rgba(255, 255, 255, 0.5);
  color: #3d3427;
}
.modal-panel .btn.ghost {
  background: rgba(255, 255, 255, 0.45);
  color: #3d3427;
}

@media (max-width: 900px) {
  .brand-logo { width: 70px; }
  .loading-logo img { width: 140px; }
  .loading-elements { gap: 5px; }
}
/* ------------------------------------------------------------------ Genshin wish page replica */

.wish-screen {
  background: url("./img/wish-background.webp") center / cover no-repeat, #b8d7ea;
  color: #20364f;
}
.wish-screen .wish-head {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.wish-screen .back-btn {
  left: 28px;
  top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.34);
  color: #2d4a63;
  backdrop-filter: blur(4px);
}
.wish-screen .back-btn i { font-size: 14px; }
.wish-screen .wish-title { display: none; }
.wish-screen .pity-chip {
  right: 30px;
  top: 24px;
  color: #36556e;
  background: rgba(255, 255, 255, 0.34);
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
}

.wish-elements {
  position: absolute;
  z-index: 4;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 9px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(235, 242, 246, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 3px 18px rgba(70, 108, 138, 0.16);
  backdrop-filter: blur(6px);
}
.wish-element {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #496273;
  font-size: 18px;
}
.wish-element small {
  font-family: "GI_ZH_Web", sans-serif;
  font-size: 11px;
}
.wish-element:hover,
.wish-element.active {
  background: rgba(255, 255, 255, 0.65);
  color: #21384c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.wish-element .gi-pyro { color: #d95a45; }
.wish-element .gi-hydro { color: #3c88c8; }
.wish-element .gi-anemo { color: #55a98c; }
.wish-element .gi-electro { color: #8d67c1; }
.wish-element .gi-dendro { color: #6b9b43; }
.wish-element .gi-cryo { color: #5eaebf; }
.wish-element .gi-geo { color: #b98b37; }

.wish-screen .wish-main {
  position: relative;
  justify-content: center;
  padding: 88px 5% 90px;
}
.wish-screen .wish-banner {
  width: min(860px, 74vw);
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 9;
  flex: 0 1 auto;
  border: 3px solid rgba(255, 247, 219, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.9) 0%, rgba(229, 242, 249, 0.72) 40%, rgba(195, 225, 240, 0.24) 72%),
    url("./img/wish-background.webp") center / cover;
  box-shadow:
    0 18px 55px rgba(42, 84, 117, 0.28),
    0 0 0 1px rgba(168, 134, 70, 0.4) inset,
    0 0 0 7px rgba(255, 250, 232, 0.22);
  overflow: hidden;
}
.wish-screen .wish-banner::before {
  background:
    radial-gradient(circle at 72% 48%, rgba(255, 255, 255, 0.75), transparent 52%),
    repeating-linear-gradient(90deg, transparent 0 62px, rgba(93, 145, 173, 0.08) 62px 63px);
}
.wish-screen .wish-banner-glow {
  background: radial-gradient(ellipse, rgba(108, 176, 214, 0.36), transparent 66%);
}
.wish-screen .wish-banner-copy {
  left: 7%;
  top: 24%;
  max-width: 48%;
  color: #193a53;
}
.wish-screen .wish-banner-copy .eyebrow {
  color: #2e6f93;
  font-family: "GI_Global_Web", sans-serif;
}
.wish-screen .wish-banner-copy h2 {
  margin: 8px 0 10px;
  color: #173a55;
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}
.wish-screen .wish-banner-copy p {
  color: #41667e;
  font-size: 12px;
}
.wish-tag {
  display: inline-block;
  margin-top: 16px;
  padding: 5px 10px;
  border-left: 2px solid #3f8eac;
  background: rgba(255, 255, 255, 0.45);
  color: #2d6d8a;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.wish-screen .wish-featured {
  right: 5%;
  top: 7%;
  width: 45%;
  height: 86%;
  gap: 8px;
  align-items: flex-end;
}
.wish-screen .featured-card {
  width: 132px;
  height: 94%;
  max-height: none;
  transform: skewX(-3deg);
  border: 2px solid rgba(255, 245, 211, 0.92);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(40, 86, 116, 0.35);
}
.wish-screen .featured-card:nth-child(2) { transform: translateY(8px) skewX(3deg); }
.wish-screen .featured-card span {
  color: #22465f;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.92));
  text-shadow: 0 1px 0 #fff;
}
.wish-screen .wish-rates { display: none; }
.wish-screen .wish-note { display: none; }
.wish-nav {
  position: absolute;
  left: 4.5%;
  bottom: 5%;
  display: flex;
  gap: 4px;
}
.wish-nav-btn {
  padding: 7px 13px;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
  color: #36586f;
  font-size: 11px;
  backdrop-filter: blur(3px);
}
.wish-nav-btn.active,
.wish-nav-btn:hover {
  background: rgba(255, 255, 255, 0.72);
  color: #173a55;
  box-shadow: inset 0 0 0 1px rgba(120, 160, 182, 0.35);
}
.wish-screen .wish-actions {
  position: absolute;
  right: 4.5%;
  bottom: 4.5%;
  margin: 0;
  gap: 10px;
}
.wish-screen .wish-btn {
  min-width: 170px;
  min-height: 48px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(151, 133, 99, 0.55);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 252, 242, 0.95), rgba(225, 216, 198, 0.92));
  color: #3a3a38;
  box-shadow: 0 4px 14px rgba(47, 86, 112, 0.18);
}
.wish-screen .wish-btn span { font-size: 13px; }
.wish-screen .wish-btn small { margin-left: 2px; color: #6b665c; }
.wish-screen .wish-btn i { color: #c6a15a; font-size: 15px; }
.wish-screen .wish-btn--ten {
  border-color: rgba(151, 133, 99, 0.7);
  background: linear-gradient(180deg, #fff8e3, #e7d5ae);
}
.wish-screen .wish-btn:hover { box-shadow: 0 0 16px rgba(255, 241, 199, 0.8); }

@media (max-width: 900px) {
  .wish-elements { top: 54px; transform: translateX(-50%) scale(0.86); }
  .wish-screen .wish-main { padding: 120px 16px 120px; }
  .wish-screen .wish-banner { width: 94vw; }
  .wish-screen .wish-banner-copy { top: 22%; max-width: 54%; }
  .wish-screen .wish-banner-copy h2 { font-size: 25px; }
  .wish-screen .wish-featured { width: 42%; right: 3%; }
  .wish-screen .featured-card { width: 84px; }
  .wish-nav { bottom: 72px; left: 4%; }
  .wish-screen .wish-actions { right: 4%; bottom: 12px; left: 4%; justify-content: flex-end; }
  .wish-screen .wish-btn { min-width: 0; flex: 1; min-height: 44px; }
  .wish-screen .wish-btn small { display: none; }
}
/* Wish pool selector in place of the old element bar */
.wish-pools {
  position: absolute;
  z-index: 4;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(235, 242, 246, 0.45));
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 3px 18px rgba(70, 108, 138, 0.16);
  backdrop-filter: blur(6px);
}
.wish-pools-icon {
  color: #c6a15a;
  font-size: 16px;
}
.wish-pools label {
  color: #36586f;
  font-family: "GI_ZH_Web", sans-serif;
  font-size: 11px;
  white-space: nowrap;
}
#wishPoolSelect {
  appearance: none;
  -webkit-appearance: none;
  min-width: 200px;
  padding: 5px 22px 5px 8px;
  border: 0;
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.5);
  color: #21384c;
  font-family: "GI_ZH_Web", "GI_Global_Web", sans-serif;
  font-size: 11px;
  cursor: url("./anim/cursor.png") 4 4, auto;
}
#wishPoolSelect:hover,
#wishPoolSelect:focus {
  background: rgba(255, 255, 255, 0.8);
}
.wish-pools-arrow {
  margin-left: -20px;
  color: #57758a;
  font-size: 14px;
  pointer-events: none;
}
@media (max-width: 900px) {
  .wish-pools { top: 52px; padding: 4px 8px; gap: 4px; }
  .wish-pools label { display: none; }
  #wishPoolSelect { min-width: 170px; font-size: 10px; }
}
/* Genshin loading asset cards */
.loading-screen {
  background:
    linear-gradient(180deg, rgba(236, 246, 252, 0.62), rgba(255, 255, 255, 0.9)),
    url("./img/wish-background.webp") center / cover no-repeat;
}
.loading-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 24px 0 14px;
}
.loading-card {
  position: relative;
  width: 112px;
  height: 58px;
  border: 1px solid rgba(195, 224, 244, 0.95);
  border-radius: 10px;
  background:
    radial-gradient(circle at 76% 24%, rgba(255, 255, 255, 0.5), transparent 34%),
    linear-gradient(135deg, #d8edfb, #9bcdf0 48%, #6fb6e4);
  box-shadow:
    0 4px 14px rgba(58, 122, 165, 0.2),
    inset 0 0 0 2px rgba(255, 255, 255, 0.35);
  overflow: hidden;
  opacity: 0.62;
  transform: translateY(2px) scale(0.98);
  transition: 0.28s ease;
}
.loading-card::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 7px;
  pointer-events: none;
}
.loading-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}
.loading-card-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.92);
  font-family: "GI_ZH_Web", sans-serif;
  font-size: 20px;
  text-shadow: 0 1px 4px rgba(44, 104, 146, 0.45);
}
.loading-card.active {
  opacity: 1;
  transform: translateY(-3px) scale(1.04);
  border-color: rgba(255, 251, 229, 0.98);
  box-shadow:
    0 8px 22px rgba(49, 118, 164, 0.28),
    0 0 18px rgba(208, 239, 255, 0.8),
    inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}
.loading-card.done {
  opacity: 0.92;
  filter: saturate(0.9);
}
.loading-card-badge {
  position: absolute;
  z-index: 2;
  right: -6px;
  top: -6px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e65c55;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 2px 7px rgba(151, 50, 45, 0.4);
}
@media (max-width: 900px) {
  .loading-cards { gap: 5px; }
  .loading-card { width: 72px; height: 40px; border-radius: 7px; }
  .loading-card-fallback { font-size: 14px; }
}
/* Actual Genshin InitialLoader: element icons fill left-to-right + % */
.loading-screen {
  background: #fff;
}
.loading-screen .loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.loader-icons {
  position: relative;
  display: flex;
  gap: 20px;
  color: #efefef;
  font-size: 64px;
  line-height: 1;
}
.loader-icons-base,
.loader-icons-fill {
  display: flex;
  gap: 20px;
  align-items: center;
}
.loader-icons-fill {
  position: absolute;
  inset: 0;
  color: #4a4a4a;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.3s linear;
}
.loader-icons i {
  display: block;
}
.loading-text {
  min-height: 20px;
  margin-top: 24px;
  color: #b9b9b9;
  font-family: "GI_Global_Web", sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.loading-text::after {
  content: "";
  animation: loadingDots 1.6s steps(4, end) infinite;
}
.loading-text:empty::after {
  display: none;
}
.loading-percent {
  min-height: 22px;
  margin-top: 8px;
  color: #8f8f8f;
  font-family: "GI_Global_Web", sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.loading-cards,
.loading-logo,
.loading-bar,
.loading-elements {
  display: none !important;
}
@media (max-width: 900px) {
  .loader-icons { font-size: 42px; gap: 10px; }
  .loader-icons-base, .loader-icons-fill { gap: 10px; }
}
/* Pre-buffer the meteor video before starting the wish animation */
.video-buffer {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(240, 193, 90, 0.12), transparent 40%),
    #080a10;
  color: #f4ead2;
}
.wish-animation.buffering .video-buffer { display: flex; }
.video-buffer-title {
  font-family: "GI_ZH_Web", "GI_Global_Web", sans-serif;
  font-size: 16px;
  letter-spacing: 0.12em;
}
.video-buffer-bar {
  width: min(360px, 64vw);
  height: 3px;
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.video-buffer-bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #c6a15a, #f4d98c);
  transition: width 0.2s linear;
}
.video-buffer-pct {
  margin-top: 10px;
  color: #c6a15a;
  font-family: "GI_Global_Web", sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.video-buffer-hint {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 9px;
  letter-spacing: 0.08em;
}








/* 菱形四芒星闪光 */
.anim-flash::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: 46vmax;
  height: 46vmax;
  margin: -23vmax 0 0 -23vmax;
  background: radial-gradient(circle, #fff 0 12%, rgba(255, 255, 255, 0.75) 22%, transparent 46%);
  clip-path: polygon(50% 0%, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0% 50%, 42% 42%);
  filter: blur(1px) drop-shadow(0 0 24px rgba(255, 255, 255, 0.9));
}
.anim-splash.crack .anim-flash::before { animation: diamondStar 0.5s ease-out forwards; }
@keyframes diamondStar {
  0% { opacity: 0; transform: scale(0.25) rotate(-12deg); }
  35% { opacity: 1; transform: scale(1.05) rotate(0deg); }
  100% { opacity: 0; transform: scale(1.5) rotate(6deg); }
}

/* 剪影段中央光环 */
.anim-ring {
  position: absolute;
  left: 50%;
  top: 48%;
  z-index: 1;
  width: 18vmin;
  height: 18vmin;
  margin: -9vmin 0 0 -9vmin;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.75), inset 0 0 22px rgba(255, 255, 255, 0.45);
  opacity: 0;
  pointer-events: none;
}
.anim-splash.silhouette .anim-ring { animation: ringPulse 0.9s ease-out forwards; }
@keyframes ringPulse {
  0% { opacity: 0; transform: scale(0.3); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.9); }
}

/* 右侧获得提示条 */
.loot-feed {
  position: absolute;
  right: 20px;
  top: 96px;
  z-index: 6;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.loot-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 168px;
  padding: 7px 12px;
  border: 1px solid var(--loot-tone, #6e9bd8);
  background: rgba(6, 9, 18, 0.82);
  box-shadow: 0 0 14px color-mix(in srgb, var(--loot-tone, #6e9bd8) 45%, transparent);
  animation: lootIn 0.36s ease-out both;
  font-size: 12px;
  color: #f2efe6;
}
.loot-item .loot-icon {
  font-family: 'genshin-icon';
  font-size: 16px;
  line-height: 1;
  color: var(--loot-tone, #6e9bd8);
}
.loot-item .loot-name { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loot-item .loot-qty { color: rgba(255, 255, 255, 0.7); font-size: 11px; }
@keyframes lootIn {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: none; }
}















/* 光柱动画改用独立变换属性（translate/scale/rotate），不写 transform。
   独立属性可直接在合成器线程上驱动预栅格化纹理，避免每帧重新栅格化背景。
   旋转代替 skewX：±1.5° 的横向剪切在 44px 高的光柱上仅造成约 1px 顶端位移，
   改用绕底部中心的 ±1.5° 旋转后肉眼几乎不可分辨（实测两种写法像素差
   ≤0.67%、平均色差 0.17/255），但 Chromium 能将其提升为合成器动画，
   帧率从 143fps 提升到 154fps。 */
@keyframes flameGrow {
  0% { translate: -50% 0; scale: 0.7 0.2; opacity: 0; }
  55% { translate: -50% 0; scale: 1.04 1.16; opacity: 1; }
  100% { translate: -50% 0; scale: 1 1; opacity: 1; }
}
@keyframes flameFlow {
  0% { translate: -50% 0; scale: 1 1; rotate: 0deg; opacity: 0.95; }
  35% { translate: -50.5% 0; scale: 0.95 1.14; rotate: -1.5deg; opacity: 1; }
  70% { translate: -49.5% 0; scale: 1.07 0.97; rotate: 1.5deg; opacity: 0.9; }
  100% { translate: -50% 0; scale: 0.98 1.08; rotate: -0.8deg; opacity: 1; }
}

/* 卡内道具方块：橙色方块 + 底部数量条 */
.result-badge {
  position: relative;
  flex: 0 0 auto;
  width: 72%;
  aspect-ratio: 1 / 1;
  margin: 6px auto 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #fdf3d8 0%, #f6d79b 45%, #e9b463 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 2px 10px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.result-badge .badge-icon {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  font-family: 'genshin-icon';
  font-size: clamp(14px, 1.5vw, 20px);
  color: #4a7bb5;
  line-height: 1;
}
.result-badge .badge-count {
  flex: 0 0 auto;
  padding: 2px 0 3px;
  background: rgba(40, 46, 60, 0.82);
  color: #fff;
  font-size: 9px;
  text-align: center;
  letter-spacing: 0.06em;
}
.result-card.q-five .result-badge { background: linear-gradient(180deg, #fff8dd 0%, #f9dc9d 42%, #edb964 100%); }
.result-card.q-four .result-badge { background: linear-gradient(180deg, #f7f1ff 0%, #e2d2fb 42%, #c8aef2 100%); }
.result-card.q-three .result-badge { background: linear-gradient(180deg, #f0f9ff 0%, #d6ecfa 42%, #b4d8ee 100%); }

/* 光爆放射尖刺（参照视频 123s 的紫色光刃）
   原来的 blur(1.2px) 用来柔化尖刺边缘，改为在 conic 渐变自身做软过渡
   + 额外的径向遮罩羽化，效果等价但省掉一次大面积滤镜离屏合成。 */
.anim-burst::after {
  content: '';
  position: absolute;
  inset: -32%;
  background: repeating-conic-gradient(
    from 0deg at 50% 48%,
    var(--burst-tone, #b388ff) 0deg 0.35deg,
    color-mix(in srgb, var(--burst-tone, #b388ff) 55%, transparent) 0.75deg,
    transparent 1.6deg 15.5deg
  );
  -webkit-mask-image: radial-gradient(circle at 50% 48%, transparent 8%, #000 22%, #000 50%, transparent 88%);
  mask-image: radial-gradient(circle at 50% 48%, transparent 8%, #000 22%, #000 50%, transparent 88%);
  filter: none;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.anim-splash.crack .anim-burst::after {
  animation: raySpikes 0.75s ease-out forwards;
}
@keyframes raySpikes {
  0% { opacity: 0; transform: scale(0.45) rotate(0deg); }
  28% { opacity: 0.95; transform: scale(1) rotate(7deg); }
  100% { opacity: 0; transform: scale(1.55) rotate(15deg); }
}
.result-card.is-dup { filter: saturate(0.82) brightness(0.96); }
.result-card.is-dup .result-badge { opacity: 0.9; }

/* 立绘稳定态：品质色氛围光（5★金 / 4★紫 / 3★蓝） */
.anim-splash.settled::after {
  content: '';
  position: absolute;
  inset: -10%;
  z-index: 0;
  background:
    linear-gradient(112deg, transparent 24%, color-mix(in srgb, var(--burst-tone, #f0c15a) 30%, transparent) 42%, color-mix(in srgb, var(--burst-tone, #f0c15a) 10%, transparent) 52%, transparent 60%),
    linear-gradient(248deg, transparent 28%, color-mix(in srgb, var(--burst-tone, #f0c15a) 19%, transparent) 46%, color-mix(in srgb, var(--burst-tone, #f0c15a) 6%, transparent) 56%, transparent 64%),
    radial-gradient(ellipse 62% 58% at 50% 47%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 40%, transparent 76%),
    radial-gradient(ellipse 80% 72% at 50% 50%, color-mix(in srgb, var(--burst-tone, #f0c15a) 28%, transparent), color-mix(in srgb, var(--burst-tone, #f0c15a) 10%, transparent) 48%, transparent 84%);
  /* 原 blur(2px) 用渐变自身的软过渡替代：这层同时带 auroraDrift 无限动画，
     带 filter 会导致每帧重新做滤镜离屏合成。 */
  filter: none;
  pointer-events: none;
  will-change: transform, opacity;
  animation: auraIn 0.8s ease-out forwards, auroraDrift 7s 0.8s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0% { transform: scale(1) translateX(0); opacity: 0.9; }
  100% { transform: scale(1.06) translateX(1.6%); opacity: 1; }
}
/* 立绘漂浮光点 */
.anim-art-wrap::after {
  content: '';
  position: absolute;
  inset: -18%;
  pointer-events: none;
  z-index: 3;
  background-image:
    radial-gradient(circle 2.5px at 18% 26%, rgba(255, 255, 255, 0.95), transparent 70%),
    radial-gradient(circle 1.8px at 74% 18%, rgba(255, 255, 255, 0.85), transparent 70%),
    radial-gradient(circle 2px at 32% 72%, rgba(255, 255, 255, 0.9), transparent 70%),
    radial-gradient(circle 1.6px at 84% 66%, rgba(255, 255, 255, 0.8), transparent 70%),
    radial-gradient(circle 2.2px at 58% 88%, rgba(255, 255, 255, 0.85), transparent 70%),
    radial-gradient(circle 1.5px at 12% 54%, rgba(255, 255, 255, 0.75), transparent 70%),
    radial-gradient(circle 1.9px at 92% 40%, rgba(255, 255, 255, 0.8), transparent 70%);
  animation: motesFloat 6s ease-in-out infinite alternate;
  opacity: 0;
}
.anim-splash.settled .anim-art-wrap::after { animation: motesFloat 6s 0.5s ease-in-out infinite alternate, auraIn 0.9s 0.5s forwards; }
@keyframes motesFloat {
  0% { transform: translateY(6px) scale(0.98); opacity: 0.55; }
  50% { opacity: 0.95; }
  100% { transform: translateY(-10px) scale(1.02); opacity: 0.7; }
}
@keyframes auraIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 立绘切结果页的白闪过渡 */
.result-screen::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.result-screen.result-flash::before {
  animation: resultWhiteFlash 0.42s ease-out forwards;
}
@keyframes resultWhiteFlash {
  0% { opacity: 0; }
  22% { opacity: 0.92; }
  100% { opacity: 0; }
}


.sfx-toggle {
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.2));
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  vertical-align: middle;
}
.sfx-toggle:hover { background: rgba(255, 255, 255, 0.14); }
.sfx-toggle[aria-pressed="false"] { opacity: 0.55; }



/* 出金特殊 CG：来自共享素材库（29-1/cg/5star/...），加载到即覆盖立绘背景层 */
.anim-cg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.9s ease, transform 2.6s ease-out;
  pointer-events: none;
  will-change: opacity, transform;
}
.anim-cg.show {
  opacity: 1;
  transform: scale(1);
}


/* ===== 六星（隐藏）===== */
.result-card.q-six {
  border-color: #ffb066;
  box-shadow: inset 0 0 30px rgba(255, 226, 200, 0.95), 0 0 34px rgba(255, 138, 61, 0.75);
  background:
    linear-gradient(180deg, rgba(255, 246, 232, 0.98) 0%, rgba(255, 205, 150, 0.96) 40%, rgba(255, 158, 84, 0.94) 100%);
}
.result-card.q-six .result-badge {
  background: linear-gradient(180deg, #fff4e2 0%, #ffcf9a 42%, #ff9a4d 100%);
}
.result-cell.q-six::before {
  width: 80%;
  height: 250px;
  background:
    radial-gradient(ellipse 22% 58% at 52% 92%, rgba(255, 255, 255, 0.98) 0%, transparent 64%),
    radial-gradient(ellipse 36% 72% at 50% 98%, #ffe6b8 0%, transparent 70%),
    radial-gradient(ellipse 50% 82% at 50% 100%, #ffb066 0%, #ff8a3d 42%, transparent 76%);
  opacity: 1;
  filter: blur(8px);
}
.result-cell.q-six::after {
  width: 92%;
  height: 76px;
  background: radial-gradient(ellipse 50% 50% at 50% 0, rgba(255, 138, 61, 0.86), transparent 72%);
}
.anim-orbs.star6 {
  background: radial-gradient(circle, rgba(255, 138, 61, 0.45), transparent 65%);
}
.anim-splash.star6 .anim-ring { border-color: #ff8a3d; }
