:root {
  color-scheme: light;
  --bg: #edf3fb;
  --panel: rgba(255, 255, 255, 0.72);
  --soft: rgba(24, 42, 63, 0.055);
  --line: rgba(48, 70, 100, 0.18);
  --text: #132033;
  --muted: #66758a;
  --gold: #9e7c38;
  --green: #27866f;
  --blue: #477fb7;
  --red: #c85e54;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(246, 250, 255, 0.9), rgba(248, 252, 255, 0.64) 46%, rgba(21, 29, 45, 0.38)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(232, 239, 250, 0.2)),
    url("./assets/loading-bg.jpg") center / cover no-repeat,
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
}

body::before {
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(255, 255, 255, 0.3) 12.2%, transparent 12.6% 28%, rgba(255, 255, 255, 0.22) 28.2%, transparent 28.6%),
    repeating-linear-gradient(90deg, transparent 0 74px, rgba(84, 110, 145, 0.08) 75px, transparent 77px),
    repeating-linear-gradient(0deg, transparent 0 84px, rgba(84, 110, 145, 0.045) 85px, transparent 87px);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 72%, transparent);
  opacity: 0.72;
  animation: lineCurtain 18s ease-in-out infinite alternate;
}

body::after {
  background:
    radial-gradient(ellipse at 28% 4%, rgba(255, 255, 255, 0.78), transparent 34%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.34), transparent 38%, transparent 72%, rgba(5, 12, 24, 0.3)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 48%, rgba(223, 232, 247, 0.24));
  opacity: 0.86;
  animation: glassShift 24s ease-in-out infinite alternate;
}

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.ambient-particle {
  position: absolute;
  left: var(--x);
  bottom: -8vh;
  width: var(--s);
  height: var(--s);
  border-radius: 999px;
  background: rgba(235, 242, 255, 0.86);
  box-shadow: 0 0 12px rgba(235, 242, 255, 0.42), 0 0 26px rgba(121, 169, 216, 0.16);
  opacity: 0.32;
  animation: particleRise var(--t) linear infinite;
  animation-delay: var(--d);
}

.ambient-particle[style*="--h:1"] {
  background: rgba(217, 242, 91, 0.72);
  box-shadow: 0 0 12px rgba(217, 242, 91, 0.28), 0 0 26px rgba(255, 255, 255, 0.12);
}

.ambient-particle[style*="--h:2"] {
  background: rgba(180, 202, 232, 0.74);
  box-shadow: 0 0 12px rgba(180, 202, 232, 0.34), 0 0 26px rgba(255, 255, 255, 0.12);
}

.click-burst,
.cursor-spark {
  position: fixed;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.click-burst {
  width: 12px;
  height: 12px;
}

.click-burst::before,
.click-burst::after {
  position: absolute;
  inset: -18px;
  border: 1px solid rgba(213, 174, 98, 0.82);
  border-radius: 999px;
  content: "";
  animation: clickRing 780ms ease-out both;
}

.click-burst::after {
  inset: -7px;
  border-color: rgba(103, 199, 165, 0.72);
  animation-duration: 620ms;
}

.click-burst i {
  position: absolute;
  left: 5px;
  top: 5px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #ffe2a4;
  box-shadow: 0 0 12px rgba(255, 226, 164, 0.9);
  animation: clickShard 680ms ease-out both;
}

.click-burst i:nth-child(1) { --dx: 34px; --dy: -4px; }
.click-burst i:nth-child(2) { --dx: 20px; --dy: 24px; }
.click-burst i:nth-child(3) { --dx: -16px; --dy: 27px; }
.click-burst i:nth-child(4) { --dx: -34px; --dy: -6px; }
.click-burst i:nth-child(5) { --dx: -10px; --dy: -32px; }
.click-burst i:nth-child(6) { --dx: 23px; --dy: -28px; }

.cursor-spark {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(103, 199, 165, 0.9);
  box-shadow: 0 0 12px rgba(103, 199, 165, 0.85);
  animation: sparkFade 700ms ease-out both;
}

button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }

input, select {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  outline: none;
}

select option {
  color: var(--text);
  background: #f8fbff;
}
input:focus, select:focus {
  border-color: rgba(71, 127, 183, 0.56);
  box-shadow: 0 0 0 3px rgba(71, 127, 183, 0.12);
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1640px;
  margin: 0 auto;
  padding: 20px;
  animation: pageEnter 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.app-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.5) 58%, rgba(234, 242, 252, 0.56)),
    rgba(255, 255, 255, 0.54);
  box-shadow: 0 18px 48px rgba(65, 83, 115, 0.14);
  backdrop-filter: blur(18px);
  text-shadow: none;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

h1, h2, h3, p { letter-spacing: 0; }
h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
}
.brand-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title img {
  width: auto;
  height: clamp(44px, 4.4vw, 58px);
  max-width: none;
  border-radius: 0;
  flex: 0 0 auto;
}

.brand-title span {
  min-width: 0;
  white-space: nowrap;
}
h2 { margin: 0; font-size: 22px; }
h3 { margin: 0; font-size: 17px; }

.status {
  margin: 8px 0 0;
  color: rgba(62, 78, 103, 0.78);
  line-height: 1.5;
}

.tabs {
  display: flex;
  gap: 8px;
  max-width: 100%;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(18px);
}

.tabs button {
  position: relative;
  overflow: hidden;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 13px;
  background: transparent;
  flex: 0 0 auto;
  white-space: nowrap;
}

.tabs button.active {
  border-color: rgba(71, 127, 183, 0.42);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 24px rgba(71, 127, 183, 0.16);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  padding: 0 !important;
  border-color: rgba(71, 127, 183, 0.3) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.64) !important;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.theme-toggle[aria-pressed="true"] {
  border-color: rgba(170, 196, 230, 0.42) !important;
  background: rgba(20, 31, 48, 0.72) !important;
  color: #f4f7fb;
  box-shadow: 0 0 24px rgba(121, 169, 216, 0.18);
}

.tabs button.active::after,
.text-btn::after,
.add-btn::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-140%);
  content: "";
}

.tabs button.active::after {
  animation: sheen 2.8s ease-in-out infinite;
}

.view { display: none; }
.view.active {
  display: block;
  animation: viewRise 340ms ease both;
}
.lineup-view.active {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  gap: 10px;
  align-items: start;
}

.home-view.active {
  display: block;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.9fr);
  gap: 16px;
  align-items: stretch;
  min-height: clamp(620px, 72vh, 840px);
}

.home-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  min-height: 620px;
  padding: clamp(24px, 4vw, 54px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.86) 0 35%, rgba(246, 250, 255, 0.46) 62%, rgba(17, 27, 44, 0.18) 100%),
    radial-gradient(circle at 68% 48%, rgba(114, 159, 205, 0.22), transparent 30%),
    url("./assets/loading-bg.jpg") center / cover no-repeat;
  box-shadow: 0 28px 90px rgba(65, 83, 115, 0.18);
}

.home-stage::before,
.home-stage::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.home-stage::before {
  inset: 0;
  background:
    linear-gradient(105deg, transparent 0 15%, rgba(255, 255, 255, 0.42) 15.2% 15.8%, transparent 16% 100%),
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(91, 122, 160, 0.06) 119px, transparent 121px);
  opacity: 0.78;
  animation: homeLightSweep 16s ease-in-out infinite alternate;
}

.home-stage::after {
  left: 28px;
  right: 28px;
  bottom: 28px;
  height: 1px;
  background: linear-gradient(90deg, rgba(71, 127, 183, 0.44), transparent);
  box-shadow: 0 0 22px rgba(71, 127, 183, 0.18);
}

.home-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.home-visual::before,
.home-visual::after {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  content: "";
}

.home-visual::before {
  top: 20%;
  right: 18%;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.22), 0 0 80px rgba(71, 127, 183, 0.08);
  animation: homeOrbitSpin 28s linear infinite;
}

.home-visual::after {
  top: 42%;
  right: 12%;
  width: min(36vw, 460px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.38), transparent 58%);
  filter: blur(18px);
  animation: stagePulse 4.8s ease-in-out infinite alternate;
}

.home-float-card {
  position: absolute;
  z-index: 2;
  margin: 0;
  opacity: var(--card-opacity, 1);
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.58));
  transform-origin: center;
  transform: translate3d(0, 0, 0) rotate(var(--card-rotate, -5deg));
  animation: homeCardArrive 780ms cubic-bezier(0.22, 0.61, 0.36, 1) both, homeCardFloat 5.8s ease-in-out infinite alternate;
  animation-delay: calc(var(--entry-index) * 70ms), calc(900ms + var(--entry-index) * 160ms);
}

.home-float-card img {
  display: block;
  width: 100%;
  aspect-ratio: 0.72;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.44);
}

.home-float-card.is-focus {
  z-index: 5;
  left: 61%;
  top: 7%;
  width: clamp(230px, 22vw, 350px);
  --card-rotate: -5deg;
}

.home-card-1 {
  left: 45%;
  top: 43%;
  width: clamp(136px, 13vw, 206px);
  --card-opacity: 0.92;
  --card-rotate: 2deg;
}

.home-card-2 {
  right: 6%;
  top: 35%;
  width: clamp(126px, 12vw, 190px);
  --card-opacity: 0.88;
  --card-rotate: 7deg;
}

.home-card-3 {
  right: 2%;
  top: 11%;
  width: clamp(92px, 9vw, 142px);
  --card-opacity: 0.42;
  --card-rotate: 9deg;
  filter: brightness(0.72) saturate(0.68) blur(0.2px);
}

.home-card-4 {
  left: 31%;
  top: 27%;
  width: clamp(106px, 10vw, 166px);
  --card-opacity: 0.52;
  --card-rotate: -10deg;
  filter: brightness(0.76) saturate(0.7);
}

.home-card-5 {
  left: 54%;
  top: 12%;
  width: clamp(86px, 8vw, 132px);
  --card-opacity: 0.28;
  --card-rotate: -8deg;
  filter: brightness(0.6) saturate(0.55) blur(1px);
}

.home-card-6 {
  right: 14%;
  bottom: 2%;
  width: clamp(92px, 9vw, 140px);
  --card-opacity: 0.32;
  --card-rotate: -12deg;
  filter: brightness(0.68) saturate(0.56) blur(0.8px);
}

.home-copy,
.home-search,
.home-actions {
  position: relative;
  z-index: 6;
}

.home-copy {
  max-width: 560px;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.52);
}

.home-copy h2 {
  margin: 6px 0 14px;
  font-size: clamp(42px, 4.2vw, 64px);
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
}

.home-copy p:last-child {
  max-width: 560px;
  margin: 0;
  color: rgba(59, 74, 99, 0.82);
  font-size: 16px;
  line-height: 1.8;
}

.home-search {
  width: min(420px, 100%);
  margin-top: 26px;
}

.home-search::before {
  position: absolute;
  left: 17px;
  top: 16px;
  z-index: 2;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(61, 91, 119, 0.52);
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.home-search::after {
  position: absolute;
  left: 30px;
  top: 30px;
  z-index: 2;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: rgba(61, 91, 119, 0.52);
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}

.home-search input {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  padding: 0 16px 0 46px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 44px rgba(65, 83, 115, 0.14);
  backdrop-filter: blur(18px);
  outline: none;
}

.home-search input:focus {
  border-color: rgba(71, 127, 183, 0.5);
  box-shadow: 0 0 0 3px rgba(71, 127, 183, 0.12), 0 16px 44px rgba(65, 83, 115, 0.14);
}

.home-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.home-result,
.home-result-empty {
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  min-height: 58px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(16px);
}

.home-result {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.home-result:hover {
  border-color: rgba(103, 199, 165, 0.58);
  transform: translateY(-1px);
}

.home-result span {
  grid-row: 1 / span 2;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.home-result strong,
.home-result em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-result strong {
  color: var(--text);
  font-size: 14px;
}

.home-result em {
  color: rgba(83, 100, 124, 0.68);
  font-size: 12px;
  font-style: normal;
}

.home-result-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center start;
  color: rgba(83, 100, 124, 0.68);
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 12px;
  width: min(500px, 100%);
  margin-top: clamp(24px, 6vw, 82px);
}

.home-actions button,
.home-stat,
.home-keywords button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.home-actions button {
  min-height: 86px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
}

.home-actions button::after,
.home-stat::after,
.home-keywords button::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  transform: translateX(-130%);
  transition: transform 420ms ease;
  content: "";
}

.home-actions button:hover,
.home-stat:hover,
.home-keywords button:hover {
  border-color: rgba(217, 242, 91, 0.58);
  transform: translateY(-2px);
}

.home-actions button:hover::after,
.home-stat:hover::after,
.home-keywords button:hover::after {
  transform: translateX(130%);
}

.home-actions span {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.home-actions b {
  display: block;
  color: rgba(83, 100, 124, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

.home-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.home-panel {
  background: rgba(255, 255, 255, 0.68);
}

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

.home-stat {
  min-height: 88px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.home-stat span {
  display: block;
  color: rgba(83, 100, 124, 0.72);
  font-size: 13px;
}

.home-stat strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.home-news {
  display: grid;
  gap: 10px;
}

.home-news article {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.52);
}

.home-news span {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.home-news strong {
  display: block;
  margin: 5px 0 6px;
  color: var(--text);
}

.home-news p {
  margin: 0;
  color: rgba(83, 100, 124, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

.home-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-keywords button {
  min-height: 34px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.56);
  text-align: center;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 70px rgba(65, 83, 115, 0.14);
  backdrop-filter: blur(18px);
  padding: 14px;
}

.panel::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.56), transparent 30%),
    linear-gradient(315deg, rgba(71, 127, 183, 0.06), transparent 36%);
  opacity: 0.82;
  pointer-events: none;
  content: "";
}

.panel > * {
  position: relative;
}

.board-area,
.library-panel,
.detail-panel {
  min-width: 0;
}

.library-panel, .detail-panel {
  position: sticky;
  top: 14px;
}

.panel-title, .board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title.compact { margin-bottom: 10px; }

.panel-title > div > .eyebrow {
  display: none;
}

.app-head > div > .eyebrow {
  display: none;
}

.library-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.library-toggle {
  display: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  border: 1px solid rgba(213, 174, 98, 0.45);
  border-radius: 999px;
  padding: 0 9px;
  color: #ffe2a4;
  background: rgba(213, 174, 98, 0.14);
  font-weight: 900;
  box-shadow: 0 0 18px rgba(213, 174, 98, 0.1);
  animation: softPulse 3.8s ease-in-out infinite;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.filters input { grid-column: 1 / -1; }
.filters.one { grid-template-columns: 1fr; }
.hero-atlas-filters {
  grid-template-columns: minmax(220px, 1fr) 160px 160px 130px;
  margin-bottom: 14px;
}
.hero-atlas-filters input { grid-column: auto; }
.card-filters { grid-template-columns: 1fr 170px 140px; }
.card-filters input { grid-column: auto; }

.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid rgba(48, 70, 100, 0.16);
  border-radius: 8px;
  padding: 4px 6px 4px 10px;
  color: rgba(43, 57, 78, 0.88);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(14px);
  font-weight: 800;
  white-space: nowrap;
}

.board-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.board-controls select {
  width: 132px;
  min-width: 132px;
}

.field-inline input {
  width: 68px;
  min-width: 68px;
  text-align: center;
}

.lineup-savebar {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
  border: 1px solid rgba(48, 70, 100, 0.14);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(14px);
}

.lineup-savebar .text-btn {
  min-height: 38px;
  white-space: nowrap;
}

.danger-btn {
  border-color: rgba(200, 94, 84, 0.32);
  color: var(--red);
  background: rgba(200, 94, 84, 0.08);
}

.danger-btn:hover,
.danger-btn:focus-visible {
  border-color: rgba(200, 94, 84, 0.58);
  background: rgba(200, 94, 84, 0.14);
}

.local-save-note {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.saved-lineup-detail {
  margin: 0 0 8px;
}

.saved-detail-card,
.saved-empty {
  border: 1px solid rgba(48, 70, 100, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(14px);
}

.saved-detail-card header,
.saved-summary,
.saved-unit,
.saved-equips {
  display: flex;
  align-items: center;
}

.saved-detail-card header {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.saved-summary {
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.saved-summary span {
  border: 1px solid rgba(48, 70, 100, 0.12);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.48);
}

.saved-units {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 6px;
}

.saved-unit {
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(48, 70, 100, 0.12);
  border-radius: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.46);
}

.saved-unit > img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}

.saved-unit > div:nth-child(2) {
  min-width: 0;
  flex: 1 1 auto;
}

.saved-unit strong,
.saved-unit p {
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-unit strong {
  font-size: 14px;
}

.saved-unit p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.saved-equips {
  flex: 0 0 auto;
  gap: 4px;
}

.saved-equips span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(213, 174, 98, 0.26);
  border-radius: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.58);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

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

.saved-equips em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.saved-empty {
  color: var(--muted);
  font-size: 13px;
}

.board-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.board-tip {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.awaken-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  white-space: nowrap;
  border: 1px solid rgba(213, 174, 98, 0.34);
  border-radius: 8px;
  padding: 6px 10px;
  color: #624714;
  background:
    linear-gradient(135deg, rgba(255, 246, 218, 0.92), rgba(255, 255, 255, 0.58)),
    rgba(255, 248, 224, 0.62);
  box-shadow: 0 10px 24px rgba(213, 174, 98, 0.12);
  font-weight: 700;
}

.awaken-tip span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(213, 174, 98, 0.34);
  border-radius: 999px;
  color: #8a641a;
  background: linear-gradient(135deg, rgba(255, 244, 214, 0.96), rgba(217, 242, 91, 0.34));
  font-size: 12px;
  font-weight: 900;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(214, 111, 96, 0.42);
  border-radius: 8px;
  color: #ffd0c8;
  background: rgba(214, 111, 96, 0.12);
  font-size: 22px;
  line-height: 1;
}

.icon-btn:hover {
  border-color: rgba(214, 111, 96, 0.7);
  background: rgba(214, 111, 96, 0.2);
}

.list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 2px;
}

.hero-camp-group {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(48, 70, 100, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(71, 127, 183, 0.08), transparent 34%),
    rgba(255, 255, 255, 0.42);
}

.hero-camp-group.compact {
  padding: 9px;
}

.hero-camp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.hero-camp-head strong,
.atlas-camp-head h3 {
  color: var(--text);
}

.hero-camp-head > span:not(.pill) {
  min-width: 28px;
  height: 24px;
  border: 1px solid rgba(103, 199, 165, 0.36);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--green);
  background: rgba(39, 134, 111, 0.1);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.hero-camp-list {
  display: grid;
  gap: 8px;
}

.hero-camp-list .row {
  min-height: 64px;
}

.player-build {
  margin-bottom: 12px;
}

.player-build-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  border: 1px solid rgba(71, 127, 183, 0.24);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.78), rgba(242, 248, 255, 0.62) 58%, rgba(255, 255, 255, 0.66)),
    radial-gradient(circle at 20% 10%, rgba(71, 127, 183, 0.12), transparent 34%);
  box-shadow: 0 16px 38px rgba(65, 83, 115, 0.12), inset 0 0 34px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
}

.player-build-card::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.1), transparent 60%),
    repeating-linear-gradient(90deg, transparent 0 92px, rgba(255, 255, 255, 0.04) 93px, transparent 95px);
  opacity: 0.55;
  pointer-events: none;
  content: "";
}

.player-build-main {
  position: relative;
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
}

.player-build-main img {
  width: 68px;
  height: 68px;
  border: 1px solid rgba(213, 174, 98, 0.62);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 22px rgba(213, 174, 98, 0.16);
}

.player-build-main h3 {
  margin-bottom: 5px;
  font-size: 22px;
  color: var(--text);
  text-shadow: none;
}

.player-build-main .note {
  color: rgba(83, 100, 124, 0.78);
  font-weight: 700;
}

.player-build-side {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: start;
  gap: 6px;
  max-width: 280px;
}

.player-build-side .tag {
  border-color: rgba(71, 127, 183, 0.22);
  color: rgba(40, 70, 104, 0.88);
  background: rgba(255, 255, 255, 0.5);
}

.quick-heroes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.quick-hero {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 7px;
  height: 42px;
  border: 1px solid rgba(48, 70, 100, 0.14);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.58);
  text-align: left;
}

.quick-hero img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  object-fit: cover;
}

.quick-hero span {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-hero:hover {
  border-color: rgba(103, 199, 165, 0.55);
  background: rgba(103, 199, 165, 0.15);
  transform: translateY(-1px);
}

.quick-hero.disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--soft);
  animation: itemIn 360ms ease both;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.row::after,
.card::after,
.lineup-row::after,
.lineup-unit::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.13), transparent 70%);
  transform: translateX(-130%);
  content: "";
  pointer-events: none;
}

.row:hover, .row.selected {
  border-color: rgba(71, 127, 183, 0.42);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 32px rgba(71, 127, 183, 0.12);
}

.row:hover {
  transform: translateY(-2px);
}

.row:hover::after,
.card:hover::after,
.lineup-row:hover::after,
.lineup-unit:hover::after {
  animation: sheen 880ms ease;
}

.thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(103, 199, 165, 0.24), rgba(121, 169, 216, 0.2));
  transition: transform 180ms ease, filter 180ms ease;
}

.row:hover .thumb,
.card:not(.flip-card):hover img,
.flip-card:hover .card-front img {
  transform: scale(1.035);
  filter: saturate(1.08) contrast(1.05);
}

.row strong, .card-body strong { display: block; font-size: 16px; }
.meta, .note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.add-btn {
  position: relative;
  overflow: hidden;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.add-btn:hover {
  border-color: var(--green);
  background: rgba(103, 199, 165, 0.16);
}

.board {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(71, 127, 183, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(71, 127, 183, 0.06) 25%, transparent 25%),
    rgba(255, 255, 255, 0.58);
  background-size: 72px 72px;
  animation: boardGrid 16s linear infinite;
}

.board::before {
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 180deg, transparent, rgba(71, 127, 183, 0.08), transparent, rgba(255, 255, 255, 0.16), transparent);
  opacity: 0.58;
  animation: slowSpin 18s linear infinite;
  content: "";
}

.board > * {
  position: relative;
}

.slot {
  position: relative;
  color: inherit;
  min-width: 0;
  min-height: clamp(82px, 7.2vw, 112px);
  border: 1px dashed rgba(71, 127, 183, 0.26);
  border-radius: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.42);
}

.empty-slot {
  display: grid;
  place-items: center;
  gap: 4px;
  width: 100%;
  text-align: center;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.empty-slot b {
  color: var(--blue);
  font-size: 13px;
}

.empty-slot:hover,
.empty-slot:focus-visible {
  border-color: rgba(217, 242, 91, 0.68);
  background: rgba(217, 242, 91, 0.12);
  box-shadow: inset 0 0 22px rgba(217, 242, 91, 0.08), 0 0 20px rgba(217, 242, 91, 0.1);
  transform: translateY(-1px);
}

.slot.filled {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  border-style: solid;
  border-color: rgba(103, 199, 165, 0.46);
  background: rgba(103, 199, 165, 0.11);
  animation: slotPop 320ms ease both;
  box-shadow: inset 0 0 22px rgba(103, 199, 165, 0.08);
}

.slot.awakened {
  border-color: rgba(213, 174, 98, 0.68);
  background:
    linear-gradient(135deg, rgba(255, 235, 177, 0.3), rgba(255, 255, 255, 0.1) 42%, rgba(213, 174, 98, 0.16)),
    rgba(213, 174, 98, 0.1);
  box-shadow: inset 0 0 24px rgba(213, 174, 98, 0.18), 0 0 0 1px rgba(213, 174, 98, 0.16);
}

.slot.moving {
  border-color: rgba(71, 127, 183, 0.72);
  background: rgba(71, 127, 183, 0.14);
  box-shadow: 0 0 0 3px rgba(71, 127, 183, 0.12), inset 0 0 24px rgba(71, 127, 183, 0.12);
}

.slot-main {
  display: grid;
  grid-template-columns: clamp(30px, 2.8vw, 40px) minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 0;
  padding: 0 18px 0 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.slot-avatar {
  position: relative;
  overflow: hidden;
  display: block;
  width: clamp(30px, 2.8vw, 40px);
  height: clamp(30px, 2.8vw, 40px);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.36);
}

.slot-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.slot-main.is-awakened .slot-avatar {
  border: 1px solid rgba(255, 230, 166, 0.86);
  background: linear-gradient(135deg, rgba(255, 226, 164, 0.72), rgba(213, 174, 98, 0.28));
  box-shadow: 0 8px 18px rgba(213, 174, 98, 0.24);
}

.slot-main.is-awakened .slot-avatar img {
  object-position: center 16%;
  filter: saturate(1.08) contrast(1.04);
}

.slot-main strong {
  overflow: hidden;
  max-width: 100%;
  font-size: clamp(12px, 0.9vw, 14px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot .add-btn { display: none; }

.slot-awaken-toggle {
  position: absolute;
  left: 5px;
  top: 5px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  border: 1px solid rgba(213, 174, 98, 0.38);
  border-radius: 999px;
  padding: 0;
  color: #8a641a;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 245, 211, 0.72)),
    rgba(255, 255, 255, 0.72);
  font-size: 0;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 8px 18px rgba(213, 174, 98, 0.12);
}

.slot-awaken-toggle::before {
  display: none;
}

.slot-awaken-toggle::after {
  color: inherit;
  font-size: 12px;
  line-height: 1;
  content: "觉";
}

.slot-awaken-toggle.active {
  color: #172033;
  background:
    linear-gradient(135deg, rgba(255, 226, 164, 0.94), rgba(244, 214, 119, 0.74)),
    rgba(255, 255, 255, 0.82);
}

.slot-awaken-toggle.active::after {
  color: inherit;
}

.slot-awaken-toggle:hover,
.slot-awaken-toggle:focus-visible {
  border-color: rgba(213, 174, 98, 0.78);
  transform: translateY(-1px);
}

.slot-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-height: 16px;
  border: 1px solid rgba(214, 111, 96, 0.38);
  border-radius: 999px;
  color: var(--red);
  background: rgba(255, 255, 255, 0.8);
  padding: 0;
  font-size: 12px;
  line-height: 14px;
}

.slot-remove:hover,
.slot-remove:focus-visible {
  border-color: rgba(214, 111, 96, 0.76);
  background: rgba(214, 111, 96, 0.22);
}

.slot-equips {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  justify-content: flex-start;
  max-width: 100%;
  min-width: 0;
}

.slot-equip-chip,
.equip-add {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 24px;
  border: 1px solid rgba(213, 174, 98, 0.32);
  border-radius: 999px;
  color: rgba(40, 70, 104, 0.9);
  background: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
}

.slot-equip-chip {
  width: 24px;
  height: 24px;
  padding: 0;
  flex: 0 0 24px;
}

.slot-equip-chip img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.slot-equip-chip span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 12px;
}

.slot-equip-chip:hover,
.slot-equip-chip:focus-visible,
.equip-add:hover,
.equip-add:focus-visible {
  border-color: rgba(217, 242, 91, 0.62);
  background: rgba(71, 127, 183, 0.1);
  color: var(--text);
}

.equip-add {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  min-height: 24px;
  padding: 0;
  border-style: dashed;
  color: var(--blue);
  font-size: 0;
  background: rgba(255, 255, 255, 0.82);
}

.equip-add::before {
  content: "+";
  font-size: 15px;
  line-height: 1;
}
.empty {
  color: rgba(83, 100, 124, 0.48);
  font-weight: 900;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 12px 0;
}

.slot-picker[hidden] {
  display: none;
}

.slot-picker {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
}

.slot-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(232, 239, 250, 0.48);
  backdrop-filter: blur(10px);
}

.slot-picker-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  width: min(900px, 100%);
  max-height: min(760px, 88vh);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.88)),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 88px rgba(65, 83, 115, 0.18);
  animation: viewRise 220ms ease both;
}

.slot-picker-head,
.slot-pick-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slot-picker-head {
  margin-bottom: 2px;
}

.slot-picker-list {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding-right: 2px;
}

.slot-pick-group {
  display: grid;
  gap: 8px;
}

.slot-pick-group-head {
  border-left: 3px solid rgba(71, 127, 183, 0.58);
  padding-left: 10px;
}

.slot-pick-group-head strong {
  color: var(--text);
}

.slot-pick-group-head span {
  border: 1px solid rgba(48, 70, 100, 0.14);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 900;
}

.slot-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 8px;
}

.slot-pick-hero {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas:
    "img name"
    "img meta";
  align-items: center;
  gap: 4px 8px;
  min-height: 58px;
  border: 1px solid rgba(48, 70, 100, 0.14);
  border-radius: 8px;
  padding: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.58);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.slot-pick-hero img {
  grid-area: img;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.slot-pick-hero span {
  grid-area: name;
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-pick-hero small {
  grid-area: meta;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-pick-hero:hover,
.slot-pick-hero:focus-visible {
  border-color: rgba(71, 127, 183, 0.52);
  background: rgba(71, 127, 183, 0.1);
  transform: translateY(-1px);
}

.equip-picker-panel {
  width: min(980px, 100%);
}

.equip-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 8px;
}

.equip-pick-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-areas:
    "img name"
    "img meta";
  align-items: center;
  gap: 4px 9px;
  min-height: 66px;
  border: 1px solid rgba(213, 174, 98, 0.22);
  border-radius: 8px;
  padding: 8px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(213, 174, 98, 0.13), transparent 48%),
    rgba(255, 255, 255, 0.055);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.equip-pick-card img,
.equip-pick-card > span {
  grid-area: img;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  object-fit: cover;
}

.equip-pick-card > span {
  display: grid;
  place-items: center;
  color: #ffe2a4;
  background: rgba(213, 174, 98, 0.14);
  font-size: 18px;
  font-weight: 900;
}

.equip-pick-card b {
  grid-area: name;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equip-pick-card small {
  grid-area: meta;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equip-pick-card:hover,
.equip-pick-card:focus-visible {
  border-color: rgba(217, 242, 91, 0.62);
  background: rgba(217, 242, 91, 0.12);
  transform: translateY(-1px);
}

.metrics div {
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(238, 246, 255, 0.48)),
    rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 34px rgba(68, 89, 122, 0.08);
  animation: itemIn 420ms ease both;
}

.metrics span {
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.lineup-summary {
  margin: 0 0 12px;
}

.lineup-summary-card {
  overflow: hidden;
  border: 1px solid rgba(48, 70, 100, 0.14);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(237, 246, 255, 0.58)),
    rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 52px rgba(68, 89, 122, 0.1);
  backdrop-filter: blur(16px);
}

.lineup-summary-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.lineup-summary-card header span {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.lineup-summary-card header strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 18px;
}

.lineup-summary-card header em {
  flex: 0 0 auto;
  border: 1px solid rgba(213, 174, 98, 0.36);
  border-radius: 999px;
  padding: 5px 10px;
  color: #8a641a;
  background: rgba(255, 244, 214, 0.68);
  font-style: normal;
  font-weight: 900;
}

.lineup-summary-card.is-empty {
  color: var(--muted);
}

.lineup-summary-card.is-empty strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

.lineup-summary-card.is-empty p {
  margin: 0;
  font-size: 13px;
}

.lineup-summary-units {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 8px;
}

.lineup-summary-unit {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(48, 70, 100, 0.12);
  border-radius: 8px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.52);
}

.lineup-summary-unit > img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
}

.lineup-summary-unit.is-awakened > img {
  border: 1px solid rgba(255, 226, 164, 0.86);
  object-position: center 22%;
  box-shadow: 0 8px 18px rgba(213, 174, 98, 0.2);
}

.lineup-summary-unit strong,
.lineup-summary-unit p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-summary-unit strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.lineup-summary-unit p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.summary-equips {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.summary-equips span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(213, 174, 98, 0.22);
  border-radius: 999px;
  overflow: hidden;
  color: #8a641a;
  background: rgba(255, 244, 214, 0.58);
  font-size: 11px;
  font-weight: 900;
}

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

.summary-equips small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.rec-insight {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  min-height: 176px;
  border: 1px solid rgba(103, 199, 165, 0.18);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(103, 199, 165, 0.16), rgba(255, 255, 255, 0.34) 44%, rgba(213, 174, 98, 0.12)),
    rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 18px 42px rgba(68, 89, 122, 0.08);
  backdrop-filter: blur(16px);
}

.rec-insight.is-empty {
  align-content: end;
}

.rec-insight::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 22%, rgba(255, 255, 255, 0.38) 24%, transparent 29% 56%, rgba(255, 255, 255, 0.22) 58%, transparent 64%),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(71, 127, 183, 0.055) 43px, transparent 45px);
  opacity: 0.68;
  content: "";
  animation: insightSweep 12s ease-in-out infinite alternate;
}

.rec-insight > * {
  position: relative;
  z-index: 1;
}

.rec-insight-head span {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.rec-insight-head strong,
.rec-insight.is-empty strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 20px;
}

.rec-insight p {
  max-width: 36em;
  margin: 0;
  color: rgba(48, 68, 94, 0.82);
  font-size: 13px;
  line-height: 1.7;
}

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

.rec-insight-grid span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.46);
}

.rec-insight-grid b {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rec-insight-grid em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.rec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: end;
}

.rec-chips span {
  border: 1px solid rgba(103, 199, 165, 0.22);
  border-radius: 999px;
  padding: 5px 9px;
  color: #237763;
  background: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  font-weight: 900;
}

.rec-orbit {
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 168px;
  height: 168px;
  border: 1px solid rgba(103, 199, 165, 0.18);
  border-radius: 999px;
  opacity: 0.88;
  animation: orbitTurn 16s linear infinite;
}

.rec-orbit::before,
.rec-orbit::after {
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(213, 174, 98, 0.18);
  border-radius: inherit;
  content: "";
}

.rec-orbit::after {
  inset: 52px;
  border-color: rgba(71, 127, 183, 0.16);
}

.rec-orbit i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(217, 242, 91, 0.82);
  box-shadow: 0 0 18px rgba(217, 242, 91, 0.45);
}

.rec-orbit i:nth-child(1) { left: 22px; top: 24px; }
.rec-orbit i:nth-child(2) { right: 34px; top: 60px; background: rgba(103, 199, 165, 0.78); }
.rec-orbit i:nth-child(3) { left: 72px; bottom: 18px; background: rgba(213, 174, 98, 0.72); }

.rec-particle-stage {
  --rec-accent: #8ed8df;
  position: relative;
  overflow: hidden;
  min-height: 460px;
  border: 1px solid color-mix(in srgb, var(--rec-accent) 34%, rgba(255, 255, 255, 0.62));
  border-radius: 8px;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rec-accent) 30%, transparent), transparent 36%),
    radial-gradient(circle at 70% 75%, rgba(213, 174, 98, 0.08), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(225, 239, 247, 0.66) 46%, rgba(207, 226, 238, 0.58));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 18px 44px rgba(40, 58, 84, 0.13);
  backdrop-filter: blur(18px);
}

.rec-particle-stage::before {
  position: absolute;
  inset: -58px;
  z-index: -1;
  background: var(--rec-depth, var(--rec-hero-image, none)) center bottom / auto 112% no-repeat;
  opacity: 0.3;
  filter: blur(6px) grayscale(0.12) saturate(0.96) contrast(1.18);
  content: "";
}

.rec-particle-stage::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--rec-accent) 44%, transparent) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(103, 199, 165, 0.18) 0 1px, transparent 1.7px);
  background-position: 0 0, 12px 18px, 26px 8px;
  background-size: 28px 28px, 44px 44px;
  opacity: 0.2;
  content: "";
  mask-image: radial-gradient(ellipse at 52% 48%, #000 0 34%, transparent 73%);
  animation: heroParticleFlow 16s linear infinite;
}

.rec-particle-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 36%, rgba(255, 255, 255, 0.42) 42%, transparent 51%),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(101, 139, 170, 0.055) 47px, transparent 49px),
    repeating-linear-gradient(90deg, transparent 0 50px, rgba(101, 139, 170, 0.048) 51px, transparent 53px);
  opacity: 0.72;
  animation: recGridSweep 8s ease-in-out infinite alternate;
}

.rec-particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.rec-particle-halo {
  position: absolute;
  right: 42px;
  top: 48px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(103, 199, 165, 0.16);
  border-radius: 999px;
  animation: orbitTurn 22s linear infinite;
}

.rec-particle-halo::before,
.rec-particle-halo::after {
  position: absolute;
  border: 1px solid rgba(213, 174, 98, 0.18);
  border-radius: inherit;
  content: "";
}

.rec-particle-halo::before {
  inset: 38px;
}

.rec-particle-halo::after {
  inset: 86px;
  border-color: rgba(71, 127, 183, 0.18);
}

.rec-particle-image,
.rec-particle-grain {
  position: absolute;
  right: -8%;
  bottom: -6%;
  width: 116%;
  height: 114%;
  object-fit: contain;
  object-position: center bottom;
}

.rec-particle-image {
  z-index: 1;
  opacity: 0.26;
  filter: grayscale(0.22) contrast(1.26) saturate(1.08);
  mask-image: radial-gradient(ellipse at 58% 46%, #000 0 42%, transparent 78%);
}

.rec-particle-grain {
  z-index: 2;
  background: var(--rec-hero-image, none) right bottom / contain no-repeat;
  opacity: 0;
  filter: saturate(1.06) contrast(1.28);
  mix-blend-mode: multiply;
  mask-image:
    radial-gradient(ellipse at 62% 48%, #000 0 38%, rgba(0, 0, 0, 0.62) 55%, transparent 73%),
    repeating-radial-gradient(circle at 50% 50%, #000 0 1px, transparent 1px 4px);
  mask-composite: intersect;
  animation: heroSignalBreath 6s ease-in-out infinite;
}

.rec-particle-copy {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 4;
  max-width: calc(100% - 28px);
  border: 1px solid color-mix(in srgb, var(--rec-accent) 30%, rgba(255, 255, 255, 0.76));
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 12px 28px rgba(40, 58, 84, 0.1);
  backdrop-filter: blur(10px);
}

.rec-particle-copy span,
.rec-particle-copy em {
  display: block;
  color: rgba(60, 82, 108, 0.72);
  font-size: 11px;
  font-style: normal;
}

.rec-particle-copy strong {
  display: block;
  margin: 2px 0;
  color: #142236;
  font-size: 19px;
  line-height: 1.05;
}

.rec-particle-stage.is-empty .rec-particle-grain {
  background:
    radial-gradient(circle at 48% 40%, rgba(103, 199, 165, 0.24), transparent 24%),
    repeating-radial-gradient(circle at 50% 50%, rgba(71, 127, 183, 0.28) 0 1px, transparent 1px 7px);
  mask-image: none;
}

.rec-hero-signal {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 230px;
  margin-top: 4px;
  border: 1px solid rgba(103, 199, 165, 0.16);
  border-radius: 8px;
  padding: 14px;
  isolation: isolate;
  background:
    radial-gradient(circle at 78% 48%, rgba(103, 199, 165, 0.18), transparent 33%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(238, 247, 255, 0.2));
}

.rec-hero-signal::before {
  position: absolute;
  inset: -22px;
  background: var(--rec-hero-image, none) right 4px bottom -10px / auto 112% no-repeat;
  opacity: 0.2;
  filter: blur(16px) saturate(1.22);
  content: "";
  transform: scale(1.04);
}

.rec-hero-signal::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, rgba(103, 199, 165, 0.72) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(213, 174, 98, 0.58) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(71, 127, 183, 0.42) 0 1px, transparent 1.8px);
  background-position: 0 0, 9px 12px, 18px 5px;
  background-size: 18px 18px, 26px 26px, 34px 34px;
  opacity: 0.46;
  content: "";
  mask-image: linear-gradient(90deg, transparent 0 34%, #000 62%, transparent 100%);
  animation: heroParticleFlow 14s linear infinite;
}

.rec-hero-signal img {
  position: absolute;
  right: -4px;
  bottom: -18px;
  z-index: 1;
  width: 60%;
  height: calc(100% + 28px);
  object-fit: contain;
  object-position: right bottom;
  opacity: 0.34;
  filter: drop-shadow(0 20px 32px rgba(48, 70, 100, 0.2)) saturate(1.14);
  mask-image: radial-gradient(circle at 58% 44%, #000 0 45%, transparent 70%);
}

.rec-hero-particles {
  position: absolute;
  top: 12px;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 64%;
  background: var(--rec-hero-image, none) right bottom / contain no-repeat;
  opacity: 0.52;
  filter: contrast(1.15) saturate(1.1);
  mix-blend-mode: multiply;
  mask-image:
    radial-gradient(circle at 58% 42%, #000 0 34%, rgba(0, 0, 0, 0.6) 48%, transparent 70%),
    repeating-radial-gradient(circle at 56% 46%, #000 0 1px, transparent 1px 4px);
  mask-composite: intersect;
  animation: heroSignalBreath 5.8s ease-in-out infinite;
}

.rec-hero-signal.is-empty .rec-hero-particles {
  inset: 18px 12px 12px auto;
  width: 58%;
  border: 1px solid rgba(103, 199, 165, 0.16);
  border-radius: 999px;
  background:
    radial-gradient(circle at 45% 45%, rgba(103, 199, 165, 0.32), transparent 24%),
    radial-gradient(circle at 62% 57%, rgba(213, 174, 98, 0.22), transparent 28%),
    repeating-radial-gradient(circle at 50% 50%, rgba(71, 127, 183, 0.22) 0 1px, transparent 1px 8px);
  mask-image: none;
}

.rec-hero-signal > div:not(.rec-hero-particles):last-child {
  position: relative;
  z-index: 3;
  max-width: 46%;
}

.rec-hero-signal span,
.rec-hero-signal em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rec-hero-signal strong {
  display: block;
  margin: 3px 0 4px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
  text-shadow: 0 8px 24px rgba(255, 255, 255, 0.58);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.text-btn {
  position: relative;
  overflow: hidden;
  min-height: 36px;
  border: 1px solid rgba(103, 199, 165, 0.44);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(103, 199, 165, 0.14);
  color: var(--text);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.text-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(103, 199, 165, 0.12);
}

.text-btn:hover::after,
.add-btn:hover::after {
  animation: sheen 760ms ease;
}

.lineup-row {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--soft);
  cursor: pointer;
  animation: itemIn 360ms ease both;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.lineup-row:hover,
.lineup-row.selected {
  border-color: var(--gold);
  background: rgba(213, 174, 98, 0.12);
}

.lineup-row:hover {
  transform: translateY(-2px);
}

.lineup-row strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.lineup-row-code {
  width: max-content;
  border: 1px solid rgba(103, 199, 165, 0.32);
  border-radius: 999px;
  padding: 2px 8px;
  color: #0f7461;
  background: rgba(103, 199, 165, 0.13);
  font-size: 12px;
  font-weight: 800;
}

.stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.stage-tabs button {
  position: relative;
  overflow: hidden;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.08);
}

.stage-tabs button.active {
  border-color: rgba(103, 199, 165, 0.48);
  background: rgba(103, 199, 165, 0.16);
  box-shadow: 0 0 20px rgba(103, 199, 165, 0.1);
}

.lineup-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.lineup-unit {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.055);
  animation: itemIn 360ms ease both;
  transition: transform 160ms ease, border-color 160ms ease;
}

.lineup-unit > img {
  float: left;
  width: 44px;
  height: 44px;
  margin: 0 9px 7px 0;
  border: 1px solid rgba(213, 174, 98, 0.36);
  border-radius: 8px;
  object-fit: cover;
}

.lineup-unit:hover {
  transform: translateY(-2px);
  border-color: rgba(213, 174, 98, 0.45);
}

.lineup-unit strong {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.lineup-unit .equip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.lineup-unit .equip span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(121, 169, 216, 0.14);
  color: #dcecff;
  font-size: 12px;
}

.lineup-board-mini {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.lineup-cell {
  min-height: 52px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  padding: 5px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
}

.lineup-cell.filled {
  border-style: solid;
  border-color: rgba(103, 199, 165, 0.42);
  color: var(--text);
  background: rgba(103, 199, 165, 0.11);
  animation: cellGlow 2.6s ease-in-out infinite;
}

.lineup-cell img {
  width: 30px;
  height: 30px;
  margin: 1px auto 2px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.36);
}

.lineup-cell b {
  display: block;
  color: var(--text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inner { box-shadow: none; }
.stack { display: grid; gap: 8px; }

.info {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--soft);
  animation: itemIn 360ms ease both;
}

.buff-card {
  display: grid;
  gap: 8px;
}

.buff-effect {
  margin: 0;
  color: #f6ead0;
  line-height: 1.55;
  font-size: 13px;
}

.version-note {
  margin: 7px 0;
  border-left: 3px solid var(--gold);
  padding: 6px 8px;
  color: #ffe2a4;
  background: rgba(213, 174, 98, 0.1);
  font-size: 13px;
  line-height: 1.5;
}

.version-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.version-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 13px;
  background:
    linear-gradient(135deg, rgba(213, 174, 98, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.055);
  animation: itemIn 360ms ease both;
}

.version-card span {
  display: inline-flex;
  margin-bottom: 10px;
  border: 1px solid rgba(103, 199, 165, 0.36);
  border-radius: 999px;
  padding: 4px 9px;
  color: #bff5df;
  background: rgba(103, 199, 165, 0.12);
  font-size: 12px;
  font-weight: 900;
}

.version-card h3 {
  margin-bottom: 8px;
}

.version-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.version-card a {
  display: inline-flex;
  margin-top: 12px;
  color: #ffe2a4;
  font-weight: 900;
  text-decoration: none;
}

.info strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.bar {
  height: 7px;
  margin: 8px 0;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.bar span {
  display: block;
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, var(--green), var(--gold));
  animation: fillBar 680ms ease both;
}

.detail-art {
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  border: 1px solid rgba(213, 174, 98, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  margin-bottom: 12px;
  animation: artReveal 420ms ease both;
  transition: transform 220ms ease, filter 220ms ease;
}

.detail-art:hover {
  transform: scale(1.012);
  filter: saturate(1.08);
}

.detail-card-pair {
  position: relative;
  display: block;
  min-height: clamp(315px, 32vw, 385px);
  margin: 2px 0 16px;
  perspective: 1100px;
  animation: artReveal 420ms ease both;
}

.detail-card-pair.is-flippable {
  cursor: pointer;
}

.detail-card-pair::before {
  position: absolute;
  inset: 12% 4% 8%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 38% 40%, rgba(213, 174, 98, 0.18), transparent 36%),
    radial-gradient(circle at 64% 48%, rgba(71, 127, 183, 0.16), transparent 38%);
  filter: blur(18px);
  opacity: 0.9;
  content: "";
}

.detail-card-pair figure {
  position: absolute;
  margin: 0;
  left: 50%;
  top: 0;
  width: min(82%, 258px);
  border-radius: 8px;
  backface-visibility: hidden;
  filter: drop-shadow(0 20px 34px rgba(28, 42, 63, 0.22));
  transform-style: preserve-3d;
  transition: transform 560ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 220ms ease;
  will-change: transform;
}

.detail-card-pair figure:first-child {
  z-index: 2;
  transform: translateX(-50%) rotateY(0deg) rotateZ(-1.5deg);
}

.detail-card-pair figure:nth-child(2) {
  z-index: 1;
  transform: translateX(-50%) rotateY(180deg) rotateZ(1.5deg);
}

.detail-card-pair.flipped figure:first-child {
  z-index: 1;
  transform: translateX(-50%) rotateY(-180deg) rotateZ(-1.5deg);
}

.detail-card-pair.flipped figure:nth-child(2) {
  z-index: 2;
  transform: translateX(-50%) rotateY(0deg) rotateZ(1.5deg);
}

.detail-card-pair img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 379 / 519;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(48, 70, 100, 0.12);
}

.detail-card-pair figure:hover {
  z-index: 3;
  filter: drop-shadow(0 26px 42px rgba(28, 42, 63, 0.3));
}

.detail-card-pair figcaption {
  position: absolute;
  left: 10px;
  bottom: -10px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  padding: 4px 11px;
  color: #152238;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 20px rgba(34, 48, 70, 0.14);
  backdrop-filter: blur(8px);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.tag {
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: #dce6e2;
  font-size: 12px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.tag:hover {
  transform: translateY(-1px);
  background: rgba(103, 199, 165, 0.13);
}

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

.stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--soft);
  animation: itemIn 360ms ease both;
}

.stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.skill-text {
  color: rgba(32, 45, 66, 0.92);
  line-height: 1.65;
  white-space: pre-wrap;
}

.detail-panel .skill-text,
.detail-panel .info .note {
  border: 1px solid rgba(48, 70, 100, 0.12);
  border-radius: 8px;
  padding: 10px;
  color: rgba(28, 42, 63, 0.92);
  background: rgba(255, 255, 255, 0.68);
}

.lineup-code-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(103, 199, 165, 0.36);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(103, 199, 165, 0.16), rgba(255, 255, 255, 0.72));
  box-shadow: 0 14px 34px rgba(65, 83, 115, 0.12);
}

.lineup-code-card span {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.lineup-code-card strong {
  display: block;
  margin-top: 3px;
  color: #132033;
  font-size: 20px;
  line-height: 1.15;
  word-break: break-all;
}

.lineup-code-card p {
  margin: 5px 0 0;
  color: rgba(45, 63, 88, 0.78);
  font-size: 12px;
  line-height: 1.45;
}

.lineup-code-card a {
  display: inline-block;
  margin-top: 5px;
  color: var(--blue);
  font-size: 12px;
  text-decoration: none;
}

.lineup-code-card button {
  height: 36px;
  border: 1px solid rgba(39, 134, 111, 0.35);
  border-radius: 8px;
  padding: 0 14px;
  color: #0f594b;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 20px rgba(39, 134, 111, 0.12);
}

.atlas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.grouped-atlas {
  grid-template-columns: 1fr;
}

.atlas-group {
  padding: 12px;
  background:
    radial-gradient(circle at 16% 0%, rgba(213, 174, 98, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.035);
}

.atlas-camp-head {
  min-height: 42px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.atlas-camp-head .eyebrow {
  margin-bottom: 3px;
}

.camp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 18px 14px;
  align-items: start;
}

.card-atlas {
  grid-template-columns: 1fr;
}

.card-type-group {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 12px;
  background:
    radial-gradient(circle at 8% 0%, rgba(103, 199, 165, 0.12), transparent 28%),
    rgba(255, 255, 255, 0.035);
  animation: itemIn 380ms ease both;
}

.card-type-group.equip {
  background:
    radial-gradient(circle at 8% 0%, rgba(213, 174, 98, 0.14), transparent 28%),
    rgba(255, 255, 255, 0.035);
}

.card-type-group.effect {
  background:
    radial-gradient(circle at 8% 0%, rgba(121, 169, 216, 0.14), transparent 28%),
    rgba(255, 255, 255, 0.035);
}

.card-type-head,
.card-quality-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-type-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(48, 70, 100, 0.12);
}

.card-type-head h3 {
  color: #a87518;
  font-size: 24px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.64);
}

.card-type-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 560px;
}

.card-type-meta span,
.card-quality-head span {
  border: 1px solid rgba(48, 70, 100, 0.12);
  border-radius: 999px;
  padding: 4px 8px;
  color: rgba(52, 72, 100, 0.86);
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.card-type-meta strong {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  border: 1px solid rgba(213, 174, 98, 0.45);
  border-radius: 999px;
  padding: 0 9px;
  color: #9a6b14;
  background: rgba(255, 249, 226, 0.76);
}

.card-quality-groups {
  display: grid;
  gap: 14px;
}

.card-quality-group {
  display: grid;
  gap: 9px;
}

.card-quality-head {
  min-height: 32px;
  border-left: 3px solid rgba(103, 199, 165, 0.72);
  padding-left: 10px;
  color: #132033;
}

.card-type-group.equip .card-quality-head {
  border-left-color: rgba(213, 174, 98, 0.82);
}

.card-type-group.effect .card-quality-head {
  border-left-color: rgba(121, 169, 216, 0.82);
}

.card-quality-head strong {
  color: #253550;
  font-size: 14px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.card-library-card {
  min-height: 418px;
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(8, 13, 13, 0.82);
  animation: itemIn 360ms ease both;
  transition: transform 180ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.flip-card {
  min-height: 366px;
  overflow: visible;
  border: 0;
  background: transparent;
  perspective: 1200px;
}

.flip-card::after {
  display: none;
}

.card-inner {
  position: relative;
  min-height: inherit;
  height: 100%;
  border-radius: 8px;
  transform-style: preserve-3d;
  transition: transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.flip-card.flipped .card-inner,
.flip-card:focus-visible .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 34%),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 48px rgba(34, 48, 70, 0.18);
  backface-visibility: hidden;
}

.card-face::before {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background:
    linear-gradient(115deg, transparent 0 34%, rgba(255, 226, 164, 0.24) 42%, transparent 52%),
    radial-gradient(circle at 18% 10%, rgba(103, 199, 165, 0.18), transparent 34%);
  opacity: 0;
  transform: translateX(-22%);
  transition: opacity 220ms ease, transform 620ms ease;
  pointer-events: none;
  content: "";
}

.flip-card.flipped .card-face::before {
  opacity: 1;
  transform: translateX(22%);
}

.card-front {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.card-library-card .card-front {
  grid-template-rows: 300px minmax(104px, auto);
}

.card-library-card .card-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-library-card .card-body {
  display: grid;
  align-content: start;
  min-height: 104px;
  border-top: 1px solid rgba(48, 70, 100, 0.1);
  background: rgba(255, 255, 255, 0.66);
}

.card-library-card .card-body strong,
.card-library-card .card-body .meta {
  position: relative;
  z-index: 1;
}

.card-library-card .card-body strong {
  color: #17243a;
  line-height: 1.35;
}

.card-library-card .card-body .meta {
  margin-top: 6px;
  color: rgba(54, 73, 102, 0.86);
  line-height: 1.55;
  white-space: normal;
}

.card-back {
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 16px;
  background:
    radial-gradient(circle at 50% -10%, rgba(213, 174, 98, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(229, 238, 248, 0.82) 52%),
    rgba(255, 255, 255, 0.86);
  transform: rotateY(180deg);
}

.awaken-preview {
  justify-self: center;
  width: min(72%, 178px);
  height: 168px;
  object-fit: contain;
  border: 1px solid rgba(255, 226, 164, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26);
}

.card-back strong {
  color: #132033;
  font-size: 18px;
}

.card-back .meta,
.card-back .note {
  color: rgba(45, 63, 88, 0.8);
}

.card-back .tags {
  margin-top: 4px;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(213, 174, 98, 0.55);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.flip-card:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: none;
}

.card img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.5);
  transition: transform 220ms ease, filter 220ms ease;
}

.card-body { padding: 10px; }
.hero-atlas-card {
  isolation: isolate;
  display: block;
  min-width: 0;
  overflow: visible;
  border-color: rgba(255, 255, 255, 0.72);
  padding: 10px 10px 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(238, 245, 252, 0.7)),
    rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 38px rgba(34, 48, 70, 0.13);
  transform-style: preserve-3d;
}

.hero-atlas-card.has-awaken {
  cursor: pointer;
}

.hero-atlas-card::before {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 30% 12%, rgba(213, 174, 98, 0.18), transparent 28%),
    linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.72) 44%, transparent 58%);
  opacity: 0;
  transform: translateX(-12%);
  transition: opacity 220ms ease, transform 520ms ease;
  content: "";
}

.hero-atlas-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 28px 54px rgba(34, 48, 70, 0.2);
}

.hero-atlas-card:hover::before {
  opacity: 1;
  transform: translateX(14%);
}

.hero-card-stack {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 379 / 560;
  min-height: 0;
  margin-bottom: 12px;
  perspective: 900px;
}

.hero-card-stack::after {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  padding: 3px 9px;
  color: #152238;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 20px rgba(34, 48, 70, 0.14);
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
  content: "普通";
  pointer-events: none;
}

.hero-atlas-card.has-awaken:hover .hero-card-stack::after,
.hero-atlas-card.show-awaken .hero-card-stack::after {
  opacity: 1;
  transform: translateY(0);
}

.hero-atlas-card.show-awaken .hero-card-stack::after {
  content: "觉醒";
}

.hero-awaken-peek {
  position: absolute;
  top: 10px;
  right: 2px;
  z-index: 0;
  width: 78%;
  height: auto !important;
  aspect-ratio: 379 / 519;
  object-fit: contain;
  border-radius: 8px;
  opacity: 0.42;
  filter: saturate(0.9) brightness(1.04);
  transform: rotateZ(8deg) translateX(10px) translateY(3px) scale(0.92);
  box-shadow: 0 16px 30px rgba(34, 48, 70, 0.18);
  transition: opacity 220ms ease, transform 260ms ease, filter 220ms ease;
}

.hero-card-frame {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: 88%;
  aspect-ratio: 379 / 519;
  border: 1px solid rgba(48, 70, 100, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 18px 34px rgba(34, 48, 70, 0.18);
  transform: rotateZ(-1.8deg) translateX(-5px);
  transition: transform 240ms ease, box-shadow 240ms ease, filter 220ms ease;
}

.hero-card-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.hero-atlas-card:hover .hero-awaken-peek {
  opacity: 0.76;
  filter: saturate(1.08) brightness(1.08);
  transform: rotateZ(11deg) translateX(20px) translateY(-2px) scale(0.94);
}

.hero-atlas-card:hover .hero-card-frame {
  transform: rotateZ(-3deg) translateX(-12px) translateY(-4px) scale(1.015);
  box-shadow: 0 26px 48px rgba(34, 48, 70, 0.24);
}

.hero-atlas-card.show-awaken .hero-awaken-peek {
  z-index: 2;
  width: 88%;
  opacity: 1;
  filter: saturate(1.08) brightness(1.06);
  transform: rotateZ(2.2deg) translateX(4px) translateY(-3px) scale(1);
  box-shadow: 0 28px 52px rgba(34, 48, 70, 0.24);
}

.hero-atlas-card.show-awaken .hero-card-frame {
  z-index: 1;
  opacity: 0.48;
  filter: saturate(0.86) brightness(1.05);
  transform: rotateZ(-8deg) translateX(-22px) translateY(10px) scale(0.9);
  box-shadow: 0 16px 28px rgba(34, 48, 70, 0.16);
}

.hero-atlas-card.show-awaken:hover .hero-awaken-peek {
  transform: rotateZ(1deg) translateX(0) translateY(-8px) scale(1.02);
}

.hero-atlas-card.show-awaken:hover .hero-card-frame {
  transform: rotateZ(-10deg) translateX(-28px) translateY(13px) scale(0.9);
}

.hero-cost-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #152238;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(34, 48, 70, 0.18);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.hero-atlas-card .card-body {
  min-height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.hero-atlas-card .card-body strong,
.hero-atlas-card .card-body .meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-atlas-card .card-body .meta {
  white-space: nowrap;
}

.hero-mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.hero-mini-tags span {
  display: inline-grid;
  place-items: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 0 8px;
  color: rgba(31, 52, 75, 0.78);
  background: rgba(71, 127, 183, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.player-atlas .card img { object-fit: cover; }

.player-atlas {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.player-card {
  position: relative;
  isolation: isolate;
  min-height: 520px;
  border-radius: 8px;
  animation: itemIn 420ms ease both;
  transition: transform 180ms ease, filter 180ms ease;
}

.player-card:hover {
  transform: translateY(-4px);
  filter: saturate(1.08);
}

.player-card::before {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: 10px;
  background: conic-gradient(from var(--spin, 0deg), rgba(103, 199, 165, 0.85), rgba(213, 174, 98, 0.85), rgba(121, 169, 216, 0.72), rgba(103, 199, 165, 0.85));
  opacity: 0;
  filter: blur(12px);
  transform: rotate(0deg);
  content: "";
  transition: opacity 180ms ease;
  animation: ringSpin 5s linear infinite;
}

.player-card:hover::before,
.player-card.flipped::before {
  opacity: 0.34;
}

.player-card .card-inner {
  min-height: 520px;
}

.player-front,
.player-back {
  min-height: 520px;
}

.player-front {
  display: grid;
  align-items: end;
  background:
    radial-gradient(circle at 70% 10%, rgba(213, 174, 98, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(5, 9, 9, 0.25), rgba(5, 9, 9, 0.92));
}

.player-front::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0 45%, rgba(0, 0, 0, 0.74) 100%),
    linear-gradient(110deg, transparent 0 38%, rgba(255, 255, 255, 0.16) 46%, transparent 55%);
  background-size: auto, 220% 100%;
  background-position: center, -130% center;
  pointer-events: none;
  content: "";
  animation: cardSweep 4.8s ease-in-out infinite;
}

.player-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.34);
  transform: scale(1.01);
  transition: transform 360ms ease, filter 260ms ease;
}

.player-card:hover .player-portrait {
  transform: scale(1.055);
  filter: contrast(1.06) saturate(1.08);
}

.player-front-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(7, 12, 12, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
}

.player-badge,
.player-back-head {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
}

.player-badge img,
.player-back-head img {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(213, 174, 98, 0.46);
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 18px rgba(213, 174, 98, 0.12);
}

.player-badge span,
.player-back-head span {
  display: block;
  margin-bottom: 2px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.player-badge strong,
.player-back-head strong {
  color: #ffe2a4;
  font-size: 24px;
  line-height: 1.05;
}

.player-entry {
  margin: 0;
  color: #eadfc9;
  font-size: 13px;
  line-height: 1.55;
}

.player-linked {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.player-linked span {
  border: 1px solid rgba(121, 169, 216, 0.28);
  border-radius: 999px;
  padding: 4px 8px;
  color: #dcecff;
  background: rgba(121, 169, 216, 0.13);
  font-size: 12px;
  font-weight: 800;
}

.player-back {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 14px;
  background:
    radial-gradient(circle at 18% 0%, rgba(213, 174, 98, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(103, 199, 165, 0.14), rgba(8, 13, 13, 0.96) 42%),
    rgba(8, 13, 13, 0.96);
  transform: rotateY(180deg);
}

.player-lines {
  display: grid;
  gap: 7px;
}

.player-lines p {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.player-lines b {
  color: #ffe2a4;
  font-size: 12px;
}

.player-lines span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

#players .panel {
  padding: 0;
}

#players .panel-title {
  z-index: 3;
  margin: 0;
  padding: 14px 14px 0;
}

#players .filters {
  z-index: 3;
  max-width: 620px;
  margin: 10px 14px 16px;
}

.player-atlas {
  display: block;
  clear: both;
}

.player-showcase {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(340px, 450px) minmax(0, 1.25fr);
  min-height: 740px;
  margin-top: 0;
  padding: 48px 18px 118px 28px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(8, 12, 16, 0.94) 0 28%, rgba(27, 32, 43, 0.68) 48%, rgba(9, 12, 18, 0.92) 100%),
    radial-gradient(circle at 68% 18%, rgba(210, 235, 143, 0.2), transparent 30%),
    rgba(20, 24, 33, 0.96);
}

.player-showcase-bg,
.player-showcase-bg::before,
.player-showcase-bg::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.player-showcase-bg::before {
  background-image: var(--player-bg);
  background-position: center;
  background-size: cover;
  filter: blur(22px) saturate(0.9);
  opacity: 0.3;
  transform: scale(1.08);
}

.player-showcase-bg::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 13%),
    linear-gradient(100deg, transparent 0 36%, rgba(255, 255, 255, 0.18) 41%, transparent 48%),
    radial-gradient(circle at 58% 22%, rgba(255, 255, 255, 0.28), transparent 22%);
  background-size: 92px 100%, 220% 100%, auto;
  background-position: center, -140% center, center;
  opacity: 0.42;
  animation: cardSweep 5.4s ease-in-out infinite;
}

.player-copy-panel {
  position: relative;
  z-index: 2;
  display: grid;
  align-self: center;
  gap: 14px;
  max-width: 450px;
  padding-left: 8px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.player-name-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  padding-bottom: 12px;
}

.player-name-row h3 {
  color: #fff;
  font-size: 58px;
  line-height: 0.95;
  font-weight: 900;
}

.player-name-row span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
}

.player-quote {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.45;
}

.player-skill-tabs {
  display: flex;
  gap: 18px;
  margin-top: 4px;
}

.player-skill-tab {
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
}

.player-skill-tab span {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.44), transparent 30%),
    radial-gradient(circle at 58% 60%, rgba(217, 242, 91, 0.36), transparent 42%),
    rgba(10, 17, 26, 0.72);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.player-skill-tab span::before,
.player-skill-tab span::after,
.player-skill-tab span i,
.player-skill-tab span i::before,
.player-skill-tab span i::after {
  position: absolute;
  content: "";
}

.player-skill-tab span::before {
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: inherit;
}

.player-skill-tab span::after {
  inset: -20%;
  background: conic-gradient(from 120deg, transparent, rgba(255, 255, 255, 0.3), transparent 34%);
  animation: slowSpin 5s linear infinite;
}

.player-skill-tab.has-official-icon span {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.18), transparent 46%),
    rgba(12, 18, 28, 0.72);
}

.player-skill-tab.has-official-icon span::before {
  inset: 3px;
  border-color: rgba(255, 255, 255, 0.5);
}

.player-skill-tab.has-official-icon span::after,
.player-skill-tab.has-official-icon span i {
  display: none;
}

.player-skill-tab.has-official-icon span img {
  position: relative;
  z-index: 1;
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
  filter: drop-shadow(0 0 12px rgba(217, 242, 91, 0.22));
}

.player-skill-tab span i {
  z-index: 1;
  width: 28px;
  height: 28px;
}

.skill-icon-active span i {
  border: 3px solid #d9f25b;
  border-left-color: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  transform: rotate(-28deg);
}

.skill-icon-active span i::before {
  right: -3px;
  top: 3px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #d9f25b;
  box-shadow: 0 0 14px rgba(217, 242, 91, 0.75);
}

.skill-icon-secret span {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.45), transparent 30%),
    radial-gradient(circle at 58% 58%, rgba(121, 169, 216, 0.46), transparent 42%),
    rgba(12, 18, 34, 0.78);
}

.skill-icon-secret span i {
  width: 30px;
  height: 22px;
  border: 2px solid #b8d6ff;
  border-radius: 5px;
  transform: rotate(-5deg);
  box-shadow: inset 0 0 12px rgba(121, 169, 216, 0.32), 0 0 14px rgba(121, 169, 216, 0.35);
}

.skill-icon-secret span i::before,
.skill-icon-secret span i::after {
  top: 4px;
  width: 2px;
  height: 14px;
  border-radius: 999px;
  background: #b8d6ff;
}

.skill-icon-secret span i::before { left: 8px; }
.skill-icon-secret span i::after { right: 8px; }

.skill-icon-unique span {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.45), transparent 30%),
    radial-gradient(circle at 58% 58%, rgba(213, 174, 98, 0.52), transparent 42%),
    rgba(32, 24, 12, 0.78);
}

.skill-icon-unique span i {
  left: 17px;
  top: 17px;
  width: 28px;
  height: 28px;
  background: #ffe2a4;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 79% 92%, 50% 70%, 21% 92%, 32% 56%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 12px rgba(255, 226, 164, 0.64));
}

.skill-icon-passive span {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.45), transparent 30%),
    radial-gradient(circle at 58% 58%, rgba(103, 199, 165, 0.46), transparent 42%),
    rgba(10, 28, 24, 0.78);
}

.skill-icon-passive span i {
  width: 30px;
  height: 20px;
  border: 3px solid #8ff0cf;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  transform: rotate(-35deg);
  filter: drop-shadow(0 0 12px rgba(103, 199, 165, 0.58));
}

.skill-icon-passive span i::before {
  left: 8px;
  top: -12px;
  width: 12px;
  height: 20px;
  border: 3px solid #8ff0cf;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.player-skill-tab b {
  font-size: 13px;
}

.player-skill-tab:hover span,
.player-skill-tab.active span {
  border-color: #d9f25b;
  box-shadow: 0 0 24px rgba(217, 242, 91, 0.26), 0 12px 32px rgba(0, 0, 0, 0.28);
  transform: translateY(-3px) scale(1.04);
}

.player-skill-focus {
  border-left: 3px solid #d9f25b;
  padding: 8px 0 8px 14px;
}

.player-skill-focus span {
  color: #d9f25b;
  font-size: 13px;
  font-weight: 900;
}

.player-skill-focus strong {
  display: block;
  margin: 5px 0;
  color: #fff;
  font-size: 20px;
}

.player-skill-focus p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  line-height: 1.7;
}

.showcase-lines p {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
}

.showcase-lines b {
  color: #d9f25b;
}

.showcase-lines span {
  color: rgba(255, 255, 255, 0.8);
}

.player-lineup-tags,
.player-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-lineup-tags span,
.player-hero-links span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 4px 10px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 900;
}

.player-hero-links img {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
}

.player-apply {
  width: fit-content;
  margin-top: 2px;
  border-color: rgba(217, 242, 91, 0.52);
  color: #f7ffcf;
  background: linear-gradient(135deg, rgba(217, 242, 91, 0.24), rgba(103, 199, 165, 0.2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 26px rgba(103, 199, 165, 0.16);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  font-weight: 900;
}

.player-apply:hover {
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(217, 242, 91, 0.18);
}

.player-art-stage {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 590px;
  min-width: 0;
}

.player-art-stage img {
  width: min(118%, 1040px);
  max-width: none;
  height: min(82vh, 760px);
  max-height: 760px;
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 30px 52px rgba(0, 0, 0, 0.48));
  transform: translate(-1%, -7%);
  animation: artFloat 5.8s ease-in-out infinite;
}

.player-carousel {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 4;
  display: grid;
  grid-template-columns: 48px minmax(0, 760px) 48px;
  align-items: center;
  width: min(92%, 910px);
  transform: translateX(-50%);
}

.player-thumbs {
  display: flex;
  gap: 12px;
  overflow: auto;
  padding: 10px 8px;
  scrollbar-width: thin;
}

.player-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.player-thumb img {
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.player-thumb span {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-thumb:hover img,
.player-thumb.active img {
  border-color: #d9f25b;
  box-shadow: 0 0 0 4px rgba(217, 242, 91, 0.14), 0 0 24px rgba(217, 242, 91, 0.24);
  transform: translateY(-3px) scale(1.06);
}

.player-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.player-arrow:hover {
  border-color: rgba(217, 242, 91, 0.66);
  background: rgba(217, 242, 91, 0.16);
  transform: scale(1.06);
}

.player-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}

.player-head img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.player-skills {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.skill-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.055);
  animation: itemIn 360ms ease both;
}

.skill-block span {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.skill-block b {
  display: block;
  margin-bottom: 4px;
}

.skill-block p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.dictionary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.calc-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1.08fr) minmax(420px, 0.92fr);
  gap: 14px;
  align-items: start;
}

.calc-console,
.calc-breakdown {
  min-height: 620px;
}

.calc-hero {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 190px;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(213, 174, 98, 0.28);
  border-radius: 8px;
  padding: 14px;
  background:
    radial-gradient(circle at 78% 20%, rgba(213, 174, 98, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(103, 199, 165, 0.13), rgba(8, 13, 13, 0.44));
}

.calc-hero img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.28);
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.38));
  animation: artReveal 420ms ease both;
}

.calc-hero-copy {
  display: grid;
  gap: 10px;
}

.calc-hero-copy h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

.calc-select {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.calc-select select {
  width: 100%;
  height: 44px;
}

.damage-orb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid rgba(213, 174, 98, 0.48);
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(213, 174, 98, 0.2), rgba(103, 199, 165, 0.08) 58%, rgba(0, 0, 0, 0.22)),
    conic-gradient(from 120deg, rgba(213, 174, 98, 0.95), rgba(103, 199, 165, 0.8), rgba(121, 169, 216, 0.58), rgba(213, 174, 98, 0.95));
  box-shadow: 0 0 34px rgba(213, 174, 98, 0.16), inset 0 0 32px rgba(0, 0, 0, 0.38);
  animation: orbPulse 3.4s ease-in-out infinite;
}

.damage-orb::before {
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  background: rgba(9, 16, 16, 0.9);
  content: "";
}

.damage-orb span,
.damage-orb strong {
  position: relative;
}

.damage-orb span {
  align-self: end;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.damage-orb strong {
  align-self: start;
  color: #ffe2a4;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.08;
  text-shadow: 0 0 18px rgba(213, 174, 98, 0.28);
}

.calc-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.calc-controls label {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 42%),
    rgba(255, 255, 255, 0.055);
  animation: itemIn 360ms ease both;
}

.calc-controls span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calc-controls input {
  height: 42px;
  text-align: center;
  font-weight: 900;
}

.calc-controls b {
  justify-self: end;
  color: #ffe2a4;
  font-size: 22px;
}

.calc-value-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  border: 1px solid rgba(48, 70, 100, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 34px rgba(65, 83, 115, 0.1);
}

.calc-value-toolbar label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.calc-value-toolbar select {
  width: 112px;
  height: 36px;
}

.calc-quick-levels {
  display: flex;
  gap: 6px;
}

.calc-quick-levels button {
  min-width: 46px;
  height: 34px;
  border: 1px solid rgba(71, 127, 183, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.62);
}

.calc-quick-levels button.is-current {
  border-color: rgba(39, 134, 111, 0.42);
  color: #0f594b;
  background: rgba(103, 199, 165, 0.2);
}

.calc-equip-panel {
  margin-top: 14px;
  border: 1px solid rgba(213, 174, 98, 0.24);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(213, 174, 98, 0.09), transparent 42%),
    rgba(255, 255, 255, 0.05);
}

.calc-equip-selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.calc-equip-selects label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.calc-equip-selects select {
  width: 100%;
  height: 42px;
}

.calc-equip-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.calc-equip-list article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 58px;
  border: 1px solid rgba(48, 70, 100, 0.14);
  border-radius: 8px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.6);
}

.calc-equip-list img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.calc-equip-list strong,
.calc-equip-list span {
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calc-equip-list strong {
  color: var(--text);
  font-size: 14px;
}

.calc-equip-list span {
  color: var(--muted);
  font-size: 12px;
}

.calc-equip-list .note {
  grid-column: 1 / -1;
  margin: 0;
}

.power-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  min-height: 132px;
  border: 1px solid rgba(71, 127, 183, 0.24);
  border-radius: 8px;
  padding: 16px;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.5), transparent 38%),
    linear-gradient(135deg, rgba(71, 127, 183, 0.12), rgba(255, 255, 255, 0.42)),
    rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 38px rgba(255, 255, 255, 0.3), 0 18px 50px rgba(65, 83, 115, 0.14);
}

.power-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.power-card strong {
  color: var(--text);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 0.95;
  text-shadow: 0 0 22px rgba(71, 127, 183, 0.12);
}

.power-card p {
  margin: 0;
  color: rgba(83, 100, 124, 0.78);
  line-height: 1.6;
}

.equipment-value-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.equipment-value-summary > div {
  border: 1px solid rgba(71, 127, 183, 0.18);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(232, 241, 247, 0.58)),
    rgba(255, 255, 255, 0.68);
  box-shadow: 0 14px 36px rgba(65, 83, 115, 0.1);
}

.equipment-value-summary .value-score-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px 12px;
  border-color: rgba(213, 174, 98, 0.34);
  background:
    radial-gradient(circle at 88% 0, rgba(213, 174, 98, 0.24), transparent 36%),
    linear-gradient(135deg, rgba(103, 199, 165, 0.18), rgba(255, 255, 255, 0.78));
}

.equipment-value-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.equipment-value-summary strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}

.equipment-value-summary .value-score-card strong {
  font-size: 42px;
}

.equipment-value-summary b {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(213, 174, 98, 0.48);
  border-radius: 999px;
  color: #8a641a;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.72);
}

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

.damage-metrics div {
  border: 1px solid rgba(103, 199, 165, 0.24);
  border-radius: 8px;
  padding: 12px;
  background: rgba(103, 199, 165, 0.08);
  animation: itemIn 360ms ease both;
}

.damage-metrics span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.damage-metrics strong {
  color: var(--text);
  font-size: 28px;
}

.formula-card {
  margin: 12px 0;
  border: 1px solid rgba(213, 174, 98, 0.28);
  border-radius: 8px;
  padding: 12px;
  color: rgba(64, 51, 28, 0.88);
  background: rgba(158, 124, 56, 0.08);
  line-height: 1.7;
}

.skill-title {
  margin-top: 14px;
}

/* Light theme polish */
.icon-btn {
  color: var(--red);
  background: rgba(255, 255, 255, 0.68);
}

.card,
.lineup-row,
.lineup-unit,
.info,
.metrics div,
.stats div,
.damage-metrics div,
.equipment-value-summary > div,
.calc-equip-list article,
.version-card {
  border-color: rgba(48, 70, 100, 0.14);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 34px rgba(65, 83, 115, 0.1);
}

.lineup-unit .equip span,
.tag,
.pill {
  color: rgba(40, 70, 104, 0.9);
  background: rgba(255, 255, 255, 0.56);
}

.lineup-board-mini {
  border-color: rgba(48, 70, 100, 0.14);
  background: rgba(255, 255, 255, 0.5);
}

.lineup-cell {
  border-color: rgba(71, 127, 183, 0.18);
  color: rgba(83, 100, 124, 0.48);
}

.lineup-cell.filled {
  border-color: rgba(39, 134, 111, 0.34);
  background: rgba(39, 134, 111, 0.08);
}

.buff-effect,
.version-note {
  color: rgba(64, 74, 92, 0.86);
}

.version-note,
.version-card.source {
  background: rgba(255, 255, 255, 0.62);
}

.slot-picker-panel,
.equip-picker-panel {
  color: var(--text);
}

.slot-pick-hero,
.equip-pick-card {
  border-color: rgba(48, 70, 100, 0.14);
  background: rgba(255, 255, 255, 0.58);
}

.board-head,
.filters,
.board-controls,
.calc-controls,
.calc-equip-selects {
  color: var(--text);
}

.board-head {
  text-shadow: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080e18;
  --panel: rgba(11, 17, 27, 0.78);
  --soft: rgba(255, 255, 255, 0.075);
  --line: rgba(220, 232, 246, 0.18);
  --text: #f4f7fb;
  --muted: #aeb9c8;
  --gold: #d5ae62;
  --green: #67c7a5;
  --blue: #79a9d8;
  --red: #d66f60;
}

:root[data-theme="dark"] body {
  background:
    linear-gradient(90deg, rgba(4, 8, 15, 0.9), rgba(9, 15, 26, 0.7) 46%, rgba(4, 8, 15, 0.92)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(4, 8, 15, 0.32)),
    url("./assets/loading-bg.jpg") center / cover no-repeat,
    var(--bg);
}

:root[data-theme="dark"] body::before {
  opacity: 0.5;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(255, 255, 255, 0.14) 12.2%, transparent 12.6% 28%, rgba(255, 255, 255, 0.1) 28.2%, transparent 28.6%),
    repeating-linear-gradient(90deg, transparent 0 74px, rgba(220, 232, 246, 0.055) 75px, transparent 77px),
    repeating-linear-gradient(0deg, transparent 0 84px, rgba(220, 232, 246, 0.035) 85px, transparent 87px);
}

:root[data-theme="dark"] body::after {
  opacity: 0.92;
  background:
    radial-gradient(ellipse at 28% 4%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(90deg, rgba(4, 8, 15, 0.62), transparent 38%, transparent 72%, rgba(4, 8, 15, 0.62)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 48%, rgba(4, 8, 15, 0.6));
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select {
  color: var(--text);
  background: rgba(12, 18, 27, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] select option {
  color: var(--text);
  background: #111a24;
}

:root[data-theme="dark"] .app-head,
:root[data-theme="dark"] .tabs,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .home-panel,
:root[data-theme="dark"] .lineup-savebar {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(90deg, rgba(10, 16, 24, 0.72), rgba(10, 16, 24, 0.38) 58%, rgba(10, 16, 24, 0.6)),
    rgba(10, 16, 24, 0.42);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] .status,
:root[data-theme="dark"] .home-copy p:last-child,
:root[data-theme="dark"] .home-actions b,
:root[data-theme="dark"] .home-news p,
:root[data-theme="dark"] .home-stat span,
:root[data-theme="dark"] .home-result em,
:root[data-theme="dark"] .home-result-empty {
  color: rgba(236, 242, 245, 0.74);
}

:root[data-theme="dark"] .tabs button.active {
  border-color: rgba(217, 242, 91, 0.42);
  background: rgba(217, 242, 91, 0.14);
  box-shadow: 0 0 22px rgba(217, 242, 91, 0.1);
}

:root[data-theme="dark"] .home-stage {
  border-color: rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(90deg, rgba(4, 10, 18, 0.88) 0 35%, rgba(8, 17, 29, 0.52) 62%, rgba(4, 8, 15, 0.76) 100%),
    radial-gradient(circle at 68% 48%, rgba(84, 147, 186, 0.26), transparent 30%),
    url("./assets/loading-bg.jpg") center / cover no-repeat;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .home-stage::before {
  opacity: 0.66;
  background:
    linear-gradient(105deg, transparent 0 15%, rgba(255, 255, 255, 0.13) 15.2% 15.8%, transparent 16% 100%),
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(168, 221, 226, 0.045) 119px, transparent 121px);
}

:root[data-theme="dark"] .home-search input,
:root[data-theme="dark"] .home-result,
:root[data-theme="dark"] .home-result-empty,
:root[data-theme="dark"] .home-actions button,
:root[data-theme="dark"] .home-stat,
:root[data-theme="dark"] .home-news article,
:root[data-theme="dark"] .home-keywords button,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .row,
:root[data-theme="dark"] .lineup-row,
:root[data-theme="dark"] .lineup-unit,
:root[data-theme="dark"] .info,
:root[data-theme="dark"] .metrics div,
:root[data-theme="dark"] .stats div,
:root[data-theme="dark"] .damage-metrics div,
:root[data-theme="dark"] .calc-equip-list article,
:root[data-theme="dark"] .version-card,
:root[data-theme="dark"] .slot-pick-hero,
:root[data-theme="dark"] .equip-pick-card,
:root[data-theme="dark"] .saved-detail-card,
:root[data-theme="dark"] .saved-empty,
:root[data-theme="dark"] .saved-unit,
:root[data-theme="dark"] .saved-summary span,
:root[data-theme="dark"] .saved-equips span {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(11, 17, 27, 0.62);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .hero-camp-group {
  border-color: rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(135deg, rgba(103, 199, 165, 0.08), transparent 38%),
    rgba(8, 14, 23, 0.64);
}

:root[data-theme="dark"] .hero-camp-list .row {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(9, 16, 25, 0.72);
}

:root[data-theme="dark"] .hero-camp-list .row:hover,
:root[data-theme="dark"] .hero-camp-list .row.selected {
  border-color: rgba(217, 242, 91, 0.42);
  background:
    linear-gradient(135deg, rgba(217, 242, 91, 0.16), rgba(103, 199, 165, 0.1)),
    rgba(10, 18, 27, 0.86);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

:root[data-theme="dark"] .row strong {
  color: #f4f7fb;
}

:root[data-theme="dark"] .row .meta,
:root[data-theme="dark"] .row .note {
  color: rgba(226, 236, 244, 0.68);
}

:root[data-theme="dark"] .add-btn {
  border-color: rgba(255, 255, 255, 0.18);
  color: #efffb2;
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .add-btn:hover {
  border-color: rgba(217, 242, 91, 0.5);
  color: #172033;
  background: linear-gradient(135deg, rgba(217, 242, 91, 0.92), rgba(103, 199, 165, 0.66));
}

:root[data-theme="dark"] .home-actions span,
:root[data-theme="dark"] .home-stat strong,
:root[data-theme="dark"] .home-news strong,
:root[data-theme="dark"] .home-result strong,
:root[data-theme="dark"] .hero-camp-head strong,
:root[data-theme="dark"] .atlas-camp-head h3,
:root[data-theme="dark"] .player-build-main h3 {
  color: #fff;
}

:root[data-theme="dark"] .card-face {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 32%),
    rgba(8, 13, 13, 0.88);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .card-back {
  background:
    radial-gradient(circle at 50% -10%, rgba(213, 174, 98, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(103, 199, 165, 0.15), rgba(12, 18, 18, 0.94) 42%),
    rgba(8, 13, 13, 0.96);
}

:root[data-theme="dark"] .card-back strong {
  color: #ffe2a4;
}

:root[data-theme="dark"] .card-back .meta,
:root[data-theme="dark"] .card-back .note {
  color: rgba(244, 247, 251, 0.78);
}

:root[data-theme="dark"] .card-type-head {
  border-bottom-color: rgba(255, 255, 255, 0.13);
}

:root[data-theme="dark"] .card-type-head h3,
:root[data-theme="dark"] .card-quality-head strong {
  color: #ffe2a4;
  text-shadow: none;
}

:root[data-theme="dark"] .card-type-meta span,
:root[data-theme="dark"] .card-quality-head span {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(244, 247, 251, 0.78);
  background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .card-type-meta strong {
  color: #ffe2a4;
  background: rgba(213, 174, 98, 0.14);
}

:root[data-theme="dark"] .card-library-card .card-body {
  border-top-color: rgba(255, 255, 255, 0.13);
  background: rgba(11, 17, 27, 0.66);
}

:root[data-theme="dark"] .card-library-card .card-body strong {
  color: #fff;
}

:root[data-theme="dark"] .card-library-card .card-body .meta {
  color: rgba(244, 247, 251, 0.76);
}

:root[data-theme="dark"] .card img,
:root[data-theme="dark"] .detail-card-pair figure,
:root[data-theme="dark"] .detail-card-pair img {
  background: rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .hero-atlas-card {
  border-color: rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(145deg, rgba(17, 25, 36, 0.86), rgba(8, 14, 22, 0.76)),
    rgba(10, 16, 24, 0.78);
}

:root[data-theme="dark"] .hero-card-frame {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.2);
}

:root[data-theme="dark"] .hero-atlas-card .card-body {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(10, 16, 24, 0.52);
}

:root[data-theme="dark"] .hero-cost-badge {
  color: #f4f7fb;
  background: rgba(10, 16, 24, 0.78);
}

:root[data-theme="dark"] .hero-card-stack::after {
  color: #f4f7fb;
  background: rgba(10, 16, 24, 0.78);
}

:root[data-theme="dark"] .hero-mini-tags span {
  color: rgba(244, 247, 251, 0.82);
  background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .detail-card-pair figcaption {
  color: #f4f7fb;
  background: rgba(10, 16, 24, 0.74);
}

:root[data-theme="dark"] .row:hover,
:root[data-theme="dark"] .row.selected,
:root[data-theme="dark"] .lineup-row:hover,
:root[data-theme="dark"] .lineup-row.selected {
  border-color: rgba(217, 242, 91, 0.38);
  background: rgba(217, 242, 91, 0.1);
}

:root[data-theme="dark"] .board,
:root[data-theme="dark"] .lineup-board-mini {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25%),
    rgba(5, 10, 16, 0.62);
}

:root[data-theme="dark"] .slot,
:root[data-theme="dark"] .lineup-cell {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .slot.awakened {
  border-color: rgba(255, 226, 164, 0.64);
  background:
    radial-gradient(circle at 28% 10%, rgba(255, 226, 164, 0.18), transparent 40%),
    rgba(213, 174, 98, 0.1);
}

:root[data-theme="dark"] .slot-awaken-toggle {
  border-color: rgba(255, 226, 164, 0.34);
  color: #fff1bf;
  background: rgba(255, 226, 164, 0.1);
}

:root[data-theme="dark"] .slot-awaken-toggle.active {
  color: #172033;
  background:
    linear-gradient(135deg, rgba(255, 226, 164, 0.92), rgba(217, 242, 91, 0.5)),
    rgba(255, 255, 255, 0.86);
}

:root[data-theme="dark"] .board-head {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(10, 16, 24, 0.64);
}

:root[data-theme="dark"] .lineup-code-card {
  border-color: rgba(217, 242, 91, 0.28);
  background:
    linear-gradient(135deg, rgba(103, 199, 165, 0.16), rgba(9, 15, 22, 0.78));
}

:root[data-theme="dark"] .lineup-code-card strong {
  color: #f4f7fb;
}

:root[data-theme="dark"] .lineup-code-card p {
  color: rgba(244, 247, 251, 0.68);
}

:root[data-theme="dark"] .lineup-code-card button {
  color: #efffb2;
  background: rgba(217, 242, 91, 0.12);
}

:root[data-theme="dark"] .lineup-row-code {
  border-color: rgba(217, 242, 91, 0.28);
  color: #efffb2;
  background: rgba(217, 242, 91, 0.1);
}

:root[data-theme="dark"] .lineup-summary-card {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(16, 24, 35, 0.9), rgba(10, 16, 26, 0.76)),
    rgba(12, 18, 24, 0.78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .lineup-summary-card header strong,
:root[data-theme="dark"] .lineup-summary-card.is-empty strong,
:root[data-theme="dark"] .lineup-summary-unit strong {
  color: #f4f7fb;
}

:root[data-theme="dark"] .lineup-summary-card header em,
:root[data-theme="dark"] .summary-equips span {
  color: #fff1bf;
  background: rgba(255, 226, 164, 0.1);
}

:root[data-theme="dark"] .lineup-summary-unit {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .awaken-tip,
:root[data-theme="dark"] .rec-insight {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(16, 24, 35, 0.88), rgba(10, 16, 26, 0.68)),
    rgba(12, 18, 24, 0.76);
}

:root[data-theme="dark"] .rec-insight p,
:root[data-theme="dark"] .rec-hero-signal span,
:root[data-theme="dark"] .rec-hero-signal em {
  color: rgba(244, 247, 251, 0.72);
}

:root[data-theme="dark"] .rec-insight-head strong,
:root[data-theme="dark"] .rec-insight.is-empty strong,
:root[data-theme="dark"] .rec-insight-grid b,
:root[data-theme="dark"] .rec-hero-signal strong {
  color: #f4f7fb;
  text-shadow: none;
}

:root[data-theme="dark"] .rec-insight-grid span,
:root[data-theme="dark"] .rec-chips span,
:root[data-theme="dark"] .rec-hero-signal {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

:root[data-theme="dark"] .rec-particle-stage {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 62% 46%, rgba(103, 199, 165, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(16, 24, 35, 0.9), rgba(8, 13, 22, 0.68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 24px 70px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] .rec-particle-grain {
  mix-blend-mode: screen;
  opacity: 0.66;
}

:root[data-theme="dark"] .rec-particle-copy {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(8, 13, 22, 0.58);
}

:root[data-theme="dark"] .rec-particle-copy strong {
  color: #f4f7fb;
}

:root[data-theme="dark"] .rec-hero-particles {
  mix-blend-mode: screen;
  opacity: 0.58;
}

:root[data-theme="dark"] .tag,
:root[data-theme="dark"] .pill,
:root[data-theme="dark"] .lineup-unit .equip span,
:root[data-theme="dark"] .slot-equip-chip,
:root[data-theme="dark"] .equip-add,
:root[data-theme="dark"] .quick-hero,
:root[data-theme="dark"] .field-inline {
  color: rgba(245, 248, 252, 0.88);
  background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .player-build-card,
:root[data-theme="dark"] .slot-picker-panel,
:root[data-theme="dark"] .equip-picker-panel,
:root[data-theme="dark"] .calc-value-toolbar,
:root[data-theme="dark"] .equipment-value-summary > div,
:root[data-theme="dark"] .power-card {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(16, 24, 35, 0.9), rgba(10, 16, 26, 0.76)),
    rgba(12, 18, 24, 0.78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .slot-picker-backdrop {
  background: rgba(5, 8, 12, 0.56);
}

:root[data-theme="dark"] .power-card strong {
  color: #faffc8;
}

:root[data-theme="dark"] .equipment-value-summary strong,
:root[data-theme="dark"] .equipment-value-summary b {
  color: #faffc8;
}

:root[data-theme="dark"] .calc-quick-levels button {
  color: rgba(245, 248, 252, 0.88);
  background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .calc-quick-levels button.is-current {
  color: #faffc8;
  background: rgba(217, 242, 91, 0.16);
}

:root[data-theme="dark"] .formula-card,
:root[data-theme="dark"] .version-note,
:root[data-theme="dark"] .version-card.source {
  color: #f6ead0;
  background: rgba(213, 174, 98, 0.1);
}

:root[data-theme="dark"] .skill-text {
  color: #eadfc9;
}

:root[data-theme="dark"] .detail-panel .skill-text,
:root[data-theme="dark"] .detail-panel .info .note {
  border-color: rgba(255, 255, 255, 0.14);
  color: #f1e7d2;
  background: rgba(10, 16, 24, 0.56);
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes viewRise {
  from { opacity: 0; transform: translateY(8px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes itemIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes artReveal {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes detailCardFloatA {
  0%, 100% { transform: rotateZ(-4deg) translateY(14px); }
  50% { transform: rotateZ(-2.5deg) translateY(6px); }
}

@keyframes detailCardFloatB {
  0%, 100% { transform: rotateZ(5deg) translateY(0) scale(0.96); }
  50% { transform: rotateZ(3.5deg) translateY(8px) scale(0.97); }
}

@keyframes slotPop {
  0% { transform: scale(0.97); opacity: 0.65; }
  70% { transform: scale(1.015); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes insightSweep {
  from { transform: translateX(-18px); opacity: 0.5; }
  to { transform: translateX(18px); opacity: 0.78; }
}

@keyframes orbitTurn {
  to { transform: rotate(360deg); }
}

@keyframes heroParticleFlow {
  from {
    background-position: 0 0, 9px 12px, 18px 5px;
  }
  to {
    background-position: 48px -28px, -24px 42px, 62px 25px;
  }
}

@keyframes recGridSweep {
  from {
    background-position: -28px 0, 0 0, 0 0;
    opacity: 0.48;
  }
  to {
    background-position: 64px 0, 0 18px, 20px 0;
    opacity: 0.82;
  }
}

@keyframes heroSignalBreath {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(0.985);
    opacity: 0.42;
  }
  50% {
    transform: translate3d(-4px, -3px, 0) scale(1.02);
    opacity: 0.62;
  }
}

@keyframes softPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(213, 174, 98, 0.08); }
  50% { box-shadow: 0 0 24px rgba(213, 174, 98, 0.18); }
}

@keyframes cellGlow {
  0%, 100% { box-shadow: inset 0 0 10px rgba(103, 199, 165, 0.08); }
  50% { box-shadow: inset 0 0 18px rgba(103, 199, 165, 0.18), 0 0 16px rgba(103, 199, 165, 0.08); }
}

@keyframes fillBar {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}

@keyframes sheen {
  to { transform: translateX(140%); }
}

@keyframes ambientDrift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to { transform: translate3d(1.5%, 1%, 0) scale(1.04); }
}

@keyframes gridFloat {
  from { background-position: 0 0, 0 0; }
  to { background-position: 90px 90px, -90px 90px; }
}

@keyframes lineCurtain {
  from { transform: translateX(-18px) skewX(-3deg); }
  to { transform: translateX(18px) skewX(-3deg); }
}

@keyframes glassShift {
  from { transform: translateX(-12px); opacity: 0.84; }
  to { transform: translateX(12px); opacity: 0.96; }
}

@keyframes homeLightSweep {
  from { transform: translateX(-18px); opacity: 0.58; }
  to { transform: translateX(22px); opacity: 0.88; }
}

@keyframes homeOrbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes homeCardArrive {
  from {
    opacity: 0;
    transform: translate3d(20px, 18px, 0) scale(0.92) rotate(calc(var(--card-rotate, 0deg) - 4deg));
  }
  to {
    opacity: var(--card-opacity, 1);
    transform: translate3d(0, 0, 0) scale(1) rotate(var(--card-rotate, 0deg));
  }
}

@keyframes homeCardFloat {
  from { transform: translate3d(0, -5px, 0) rotate(var(--card-rotate, 0deg)); }
  to { transform: translate3d(0, 9px, 0) rotate(calc(var(--card-rotate, 0deg) + 1deg)); }
}

@keyframes boardGrid {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 72px 72px, -72px 72px, 0 0; }
}

@keyframes slowSpin {
  to { transform: rotate(360deg); }
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

@keyframes cardSweep {
  0%, 58%, 100% { background-position: center, -130% center; }
  74% { background-position: center, 135% center; }
}

@keyframes artFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@keyframes particleRise {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65);
    opacity: 0;
  }
  12% { opacity: 0.58; }
  100% {
    transform: translate3d(var(--drift), -116vh, 0) scale(1.18);
    opacity: 0;
  }
}

@keyframes clickRing {
  from {
    opacity: 0.95;
    transform: scale(0.2);
  }
  to {
    opacity: 0;
    transform: scale(1.65);
  }
}

@keyframes clickShard {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.2);
  }
}

@keyframes sparkFade {
  from {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.1);
  }
}

@keyframes orbPulse {
  0%, 100% {
    filter: saturate(1);
    transform: scale(1);
  }
  50% {
    filter: saturate(1.18);
    transform: scale(1.018);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .fx-layer { display: none; }
}

@media (max-width: 1480px) {
  h1 {
    font-size: clamp(30px, 3.1vw, 44px);
  }
  .brand-title img {
    height: clamp(42px, 3.8vw, 52px);
  }
}

@media (max-width: 1260px) {
  .lineup-view.active { grid-template-columns: 260px minmax(0, 1fr) 280px; }
  .recommend-layout { grid-template-columns: 340px 1fr; }
  .home-grid { grid-template-columns: 1fr; }
  .home-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .player-showcase {
    min-height: 700px;
  }
  .player-art-stage {
    min-height: 540px;
  }
  .player-art-stage img {
    width: min(108%, 860px);
    height: min(74vh, 660px);
    transform: translate(-1%, -5%);
  }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-console, .calc-breakdown { min-height: auto; }
}

@media (max-width: 920px) {
  .shell { padding: 12px; }
  .app-head, .lineup-view.active, .recommend-layout, .split, .home-side { grid-template-columns: 1fr; }
  .home-grid { min-height: auto; }
  .home-stage {
    min-height: 560px;
    background-position: center top;
  }
  .home-float-card.is-focus {
    left: 58%;
    top: 44%;
    width: min(42vw, 220px);
    --card-opacity: 0.72;
  }
  .home-card-1 { left: 24%; top: 62%; }
  .home-card-2 { right: 4%; top: 67%; }
  .home-card-3,
  .home-card-5,
  .home-card-6 { display: none; }
  .home-actions { margin-top: 56px; }
  .library-panel {
    position: static;
  }
  .library-panel .panel-title {
    margin-bottom: 0;
  }
  .library-actions {
    gap: 6px;
  }
  .library-toggle {
    display: inline-flex;
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
    white-space: nowrap;
  }
  .library-body {
    overflow: hidden;
    max-height: 66vh;
    margin-top: 12px;
    transition: max-height 260ms ease, opacity 220ms ease, margin-top 220ms ease;
  }
  .library-panel.is-collapsed .library-body {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    pointer-events: none;
  }
  .library-panel:not(.is-collapsed) #heroList {
    max-height: 46vh;
    overflow: auto;
    padding-right: 3px;
  }
  .tabs {
    width: 100%;
    max-width: calc(100vw - 24px);
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    justify-content: flex-start;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .tabs button {
    min-width: max-content;
    scroll-snap-align: start;
  }
  .board-head {
    align-items: stretch;
  }
  .board {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .lineup-savebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
  }
  #lineupNameInput,
  #saveCustomLineup,
  #savedLineupSelect,
  .local-save-note {
    grid-column: 1 / -1;
  }
  #loadCustomLineup {
    grid-column: 1;
  }
  #deleteCustomLineup {
    grid-column: 2;
  }
  .lineup-savebar .text-btn,
  .lineup-savebar input,
  .lineup-savebar select {
    width: 100%;
    min-height: 38px;
    height: 38px;
    font-size: 13px;
  }
  .local-save-note {
    margin-top: 0;
    font-size: 11px;
    line-height: 1.35;
  }
  .saved-detail-card,
  .saved-empty {
    padding: 8px;
  }
  .saved-units {
    grid-template-columns: 1fr;
    max-height: 180px;
    overflow: auto;
  }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .calc-hero { grid-template-columns: 150px 1fr; }
  .damage-orb { grid-column: 1 / -1; max-width: 220px; justify-self: center; width: 100%; }
  .calc-controls, .calc-equip-selects, .equipment-value-summary { grid-template-columns: repeat(2, 1fr); }
  .calc-equip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-atlas-filters, .card-filters { grid-template-columns: 1fr; }
  .hero-atlas-filters input, .card-filters input { grid-column: 1 / -1; }
  .player-showcase {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 18px 14px 108px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0 28%, rgba(21, 29, 43, 0.9) 66%, rgba(11, 16, 25, 0.96) 100%),
      radial-gradient(circle at 50% 10%, rgba(217, 242, 91, 0.2), transparent 34%),
      rgba(18, 24, 35, 0.96);
  }
  .player-copy-panel {
    order: 2;
    align-self: start;
    max-width: 520px;
    width: 100%;
    margin: -34px auto 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 14px;
    background: rgba(9, 15, 24, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 46px rgba(4, 10, 20, 0.24);
  }
  .player-art-stage {
    order: 1;
    min-height: 350px;
    align-items: end;
  }
  .player-art-stage img {
    width: min(118vw, 640px);
    height: min(58vh, 560px);
    transform: translateY(-12%);
    object-position: center bottom;
  }
  .player-carousel {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    bottom: 14px;
    width: calc(100% - 18px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 6px;
    background: rgba(8, 14, 23, 0.62);
    backdrop-filter: blur(16px);
  }
  .player-arrow {
    width: 34px;
    height: 42px;
    border-radius: 8px;
    font-size: 26px;
  }
  .player-thumbs { gap: 8px; padding: 5px 4px; }
  .flip-card { min-height: 340px; }
}

@media (max-width: 900px) {
  .camp-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
  }
}

@media (max-width: 540px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }
  .shell {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    overflow: hidden;
  }
  .app-head,
  .view,
  .panel,
  .card-type-group,
  .card-quality-group,
  .card-grid,
  .card-library-card {
    min-width: 0;
    max-width: 100%;
  }
  #cards {
    overflow: hidden;
  }
  .filters, .metrics, .stats, .calc-hero, .calc-controls, .calc-equip-selects, .calc-equip-list, .equipment-value-summary, .damage-metrics, .home-actions, .home-stats, .home-results { grid-template-columns: 1fr; }
  .calc-value-toolbar {
    align-items: stretch;
  }
  .calc-value-toolbar label,
  .calc-quick-levels {
    width: 100%;
  }
  .calc-value-toolbar select {
    flex: 1;
    width: auto;
  }
  .calc-quick-levels button {
    flex: 1;
  }
  .lineup-view.active {
    gap: 8px;
  }
  .panel {
    padding: 12px;
  }
  .player-build {
    margin-bottom: 8px;
  }
  .player-build-card {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px;
  }
  .player-build-main {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
  }
  .player-build-main img {
    width: 56px;
    height: 56px;
  }
  .player-build-main h3 {
    margin-bottom: 3px;
    font-size: 20px;
  }
  .player-build-side {
    justify-content: start;
    max-width: none;
  }
  .quick-heroes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .quick-hero {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 40px;
    padding: 5px 7px;
  }
  .quick-hero img {
    width: 30px;
    height: 30px;
  }
  .board {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
    padding: 6px;
  }
  .lineup-savebar {
    margin: 8px 0;
    border-radius: 8px;
  }
  .lineup-code-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .lineup-code-card strong {
    font-size: 18px;
  }
  .lineup-code-card button {
    width: 100%;
  }
  .saved-lineup-detail {
    margin-bottom: 6px;
  }
  .saved-detail-card header,
  .saved-summary {
    margin-bottom: 6px;
  }
  .saved-summary {
    gap: 4px;
  }
  .saved-summary span {
    padding: 2px 6px;
    font-size: 11px;
  }
  .board-tip {
    margin-bottom: 6px;
    font-size: 12px;
  }
  .slot {
    min-height: auto;
    aspect-ratio: 0.74;
    padding: 3px;
    border-radius: 6px;
  }
  .slot.filled {
    align-content: start;
    gap: 2px;
  }
  .slot-main {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 0;
    gap: 2px;
    padding-right: 0;
    overflow: hidden;
    text-align: center;
  }
  .slot-avatar {
    width: min(8.4vw, 34px);
    height: min(8.4vw, 34px);
    border-radius: 6px;
  }
  .slot-main.is-awakened {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .slot-main.is-awakened .slot-avatar {
    width: min(8.4vw, 34px);
    height: min(8.4vw, 34px);
    border-radius: 6px;
  }
  .slot-main strong {
    width: 100%;
    max-width: 100%;
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
  }
  .slot-remove {
    top: 3px;
    right: 3px;
    width: 15px;
    height: 15px;
    min-height: 15px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 13px;
  }
  .slot-equips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 16px));
    justify-content: center;
    gap: 2px;
    margin-top: 3px;
  }
  .slot-equip-chip,
  .equip-add {
    min-height: 16px;
    border-radius: 5px;
    font-size: 11px;
  }
  .slot-equip-chip {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }
  .slot-equip-chip img {
    border-radius: 5px;
  }
  .equip-add {
    grid-column: auto;
    min-height: 18px;
    width: 16px;
    height: 18px;
    flex: 0 0 16px;
    font-size: 0;
  }
  .equip-add::before {
    content: "+";
    font-size: 13px;
    line-height: 1;
  }
  .empty-slot {
    gap: 1px;
  }
  .empty-slot .empty {
    font-size: 10px;
  }
  .empty-slot b {
    font-size: 10px;
    line-height: 1.1;
  }
  .home-stage {
    min-height: 520px;
    padding: 22px;
  }
  .home-visual { opacity: 0.58; }
  .home-float-card.is-focus {
    left: 62%;
    top: 56%;
    width: min(48vw, 176px);
  }
  .home-card-1 {
    left: 8%;
    top: 68%;
    width: min(30vw, 118px);
  }
  .home-card-2 { display: none; }
  .home-copy h2 {
    font-size: clamp(32px, 9vw, 42px);
    white-space: nowrap;
  }
  .home-copy p:last-child { font-size: 14px; }
  .tabs {
    gap: 6px;
    padding: 6px;
  }
  .tabs button {
    height: 34px;
    padding: 0 12px;
    font-size: 14px;
  }
  .library-panel .panel-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
  }
  .library-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }
  .library-actions .pill {
    min-width: 30px;
    height: 26px;
    padding: 0 8px;
  }
  .library-toggle {
    display: inline-grid;
    place-items: center;
    width: 46px;
    min-width: 46px;
    min-height: 28px;
    height: 28px;
    padding: 0;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }
  .library-toggle::after {
    display: none;
  }
  .board-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    border: 1px solid rgba(48, 70, 100, 0.14);
    border-radius: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(14px);
  }
  .board-head > div:first-child {
    min-width: 0;
  }
  .board-head h2 {
    line-height: 1.12;
  }
  .board-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px 38px;
    gap: 6px;
    justify-content: stretch;
  }
  .board-controls .field-inline:first-child {
    grid-column: auto;
  }
  .board-controls .field-inline:nth-child(2) {
    width: auto;
  }
  .field-inline {
    justify-content: space-between;
    min-width: 0;
    height: 36px;
    gap: 5px;
    padding: 3px 5px 3px 8px;
    font-size: 13px;
  }
  .field-inline select,
  .field-inline input {
    height: 28px;
  }
  .board-controls select {
    width: 100%;
    min-width: 0;
  }
  .field-inline input {
    width: 40px;
    min-width: 40px;
    padding: 0 4px;
  }
  .icon-btn {
    width: 38px;
    min-width: 38px;
    height: 36px;
  }
  .row { grid-template-columns: 48px 1fr auto; }
  .slot-picker {
    align-items: end;
    padding: 0;
  }
  .slot-picker-panel {
    width: 100%;
    max-height: 82vh;
    border-radius: 8px 8px 0 0;
    padding: 12px;
  }
  .slot-pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .equip-pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .equip-pick-card {
    grid-template-columns: 40px minmax(0, 1fr);
    min-height: 60px;
    padding: 7px;
  }
  .equip-pick-card img,
  .equip-pick-card > span {
    width: 40px;
    height: 40px;
  }
  .slot-equips {
    grid-template-columns: repeat(3, minmax(0, 16px));
    justify-content: center;
  }
  .slot-awaken-toggle {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 3;
    min-height: 17px;
    width: 17px;
    height: 17px;
    margin-top: 3px;
    padding: 0;
    font-size: 0;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(213, 174, 98, 0.25);
  }
  .slot-awaken-toggle::before {
    display: none;
  }
  .slot-awaken-toggle::after {
    color: inherit;
    font-size: 10px;
    line-height: 1;
    content: "觉";
  }
  .slot-equip-chip,
  .equip-add {
    min-height: 16px;
  }
  .slot-equip-chip {
    width: 100%;
    height: 16px;
  }
  .equip-add {
    min-height: 18px;
    font-size: 0;
  }
  .player-showcase {
    margin: 0 -4px;
    min-height: auto;
    padding: 12px 10px 94px;
    border-radius: 8px;
  }
  .player-showcase-bg::before {
    filter: blur(12px) saturate(0.96);
    opacity: 0.24;
  }
  .player-copy-panel {
    gap: 10px;
    margin-top: -64px;
    padding: 12px;
  }
  .player-copy-panel .eyebrow {
    margin-bottom: -2px;
  }
  .player-name-row {
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
  }
  .player-name-row h3 {
    font-size: clamp(32px, 12vw, 44px);
    line-height: 1;
  }
  .player-name-row span {
    flex: 0 0 auto;
    min-width: 44px;
    text-align: right;
  }
  .player-quote {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .player-skill-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .player-skill-tab {
    min-width: 0;
  }
  .player-skill-tab span {
    width: 46px;
    height: 46px;
    margin-inline: auto;
  }
  .player-skill-tab.has-official-icon span img {
    width: 40px;
    height: 40px;
  }
  .player-skill-tab b {
    overflow: hidden;
    max-width: 100%;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .player-skill-focus {
    display: grid;
    gap: 3px;
    border-left-width: 2px;
    padding: 7px 0 7px 10px;
  }
  .player-skill-focus strong {
    margin: 0;
    font-size: 17px;
  }
  .player-skill-focus p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
  }
  .showcase-lines {
    display: grid;
    gap: 6px;
  }
  .player-lines p {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 7px 9px;
    font-size: 12px;
  }
  .player-lineup-tags,
  .player-hero-links {
    gap: 6px;
    max-height: 72px;
    overflow: auto;
  }
  .player-lineup-tags span,
  .player-hero-links span {
    min-height: 26px;
    padding: 3px 8px;
    font-size: 11px;
  }
  .player-hero-links img {
    width: 20px;
    height: 20px;
  }
  .player-apply {
    width: 100%;
    justify-content: center;
    min-height: 38px;
  }
  .player-art-stage {
    overflow: hidden;
    min-height: 0;
    border-radius: 8px 8px 0 0;
  }
  .player-art-stage img {
    width: 100%;
    height: clamp(238px, 66vw, 292px);
    object-fit: cover;
    object-position: center 38%;
    transform: none;
  }
  .player-carousel {
    bottom: 10px;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
  }
  .player-arrow {
    width: 30px;
    height: 38px;
  }
  .player-thumb {
    width: 48px;
  }
  .player-thumb img {
    width: 42px;
    height: 42px;
  }
  .player-thumb span {
    margin-top: 3px;
    font-size: 10px;
  }
  .camp-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .detail-card-pair {
    min-height: 300px;
  }
  .detail-card-pair figure {
    width: min(82%, 230px);
  }
  .detail-card-pair figure:first-child {
    top: 0;
    transform: translateX(-50%) rotateY(0deg) rotateZ(-1deg);
  }
  .detail-card-pair figure:nth-child(2) {
    top: 0;
    transform: translateX(-50%) rotateY(180deg) rotateZ(1deg);
  }
  .detail-card-pair.flipped figure:first-child {
    transform: translateX(-50%) rotateY(-180deg) rotateZ(-1deg);
  }
  .detail-card-pair.flipped figure:nth-child(2) {
    transform: translateX(-50%) rotateY(0deg) rotateZ(1deg);
  }
  .detail-card-pair img {
    height: auto;
  }
  .detail-card-pair figcaption {
    left: 6px;
    bottom: -8px;
    padding: 3px 8px;
    font-size: 11px;
  }
  .awaken-preview {
    width: min(68%, 136px);
    height: 128px;
  }
  #cards .panel {
    padding: 10px;
  }
  #cards .panel-title {
    align-items: center;
    margin-bottom: 10px;
  }
  .card-filters {
    gap: 7px;
  }
  .card-type-group {
    padding: 10px;
    border-radius: 8px;
  }
  .card-type-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }
  .card-type-head h3 {
    font-size: 22px;
    line-height: 1.1;
  }
  .card-type-meta {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-width: 100%;
    max-height: none;
    overflow: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .card-type-meta::-webkit-scrollbar {
    display: none;
  }
  .card-type-meta span {
    flex: 0 0 auto;
    padding: 2px 6px;
    font-size: 10px;
  }
  .card-type-meta strong {
    flex: 0 0 auto;
    min-width: 30px;
    height: 24px;
    padding: 0 7px;
    font-size: 12px;
  }
  .card-quality-groups {
    gap: 11px;
  }
  .card-quality-head {
    min-height: 28px;
    padding-left: 8px;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    justify-content: stretch;
  }
  .flip-card { min-height: 268px; }
  .card img { height: 176px; }
  .card-library-card {
    width: 100%;
    min-height: 268px;
  }
  .card-library-card .card-front {
    grid-template-columns: 1fr;
    grid-template-rows: 176px minmax(78px, auto);
    min-height: 268px;
  }
  .card-library-card .card-front img {
    height: 176px;
    padding: 5px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.42);
  }
  .card-library-card .card-body {
    min-height: 0;
    border-top: 1px solid rgba(48, 70, 100, 0.1);
    border-left: 0;
    padding: 8px;
  }
  .card-library-card .card-body strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .card-library-card .card-body .meta {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 5px;
    font-size: 10.5px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .card-library-card .card-back {
    align-content: start;
    gap: 6px;
    padding: 9px;
  }
  .card-library-card .card-back strong {
    font-size: 14px;
  }
  .card-library-card .card-back .meta {
    font-size: 11px;
  }
  .card-library-card .card-back .note {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.5;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
  }
  .card-library-card .tags {
    gap: 4px;
  }
  .card-library-card .tag {
    padding: 3px 6px;
    font-size: 10px;
  }
  .hero-card-frame img { height: 100%; }
  .calc-hero img { max-width: 220px; justify-self: center; }

  .board-guide {
    gap: 5px;
    margin-bottom: 7px;
  }

  .awaken-tip {
    width: fit-content;
    max-width: 100%;
    padding: 5px 8px;
    font-size: 11.5px;
  }

  .awaken-tip span {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .rec-insight {
    min-height: 156px;
    padding: 12px;
  }

  .rec-insight-head strong,
  .rec-insight.is-empty strong {
    font-size: 18px;
  }

  .rec-insight-grid {
    gap: 6px;
  }

  .rec-insight-grid span {
    padding: 7px;
  }

  .rec-insight-grid b {
    font-size: 15px;
  }

  .rec-particle-stage {
    min-height: 312px;
  }

  .rec-particle-halo {
    right: -18px;
    top: 44px;
    width: 210px;
    height: 210px;
  }

  .rec-particle-image,
  .rec-particle-grain {
    right: -14%;
    bottom: -8%;
    width: 128%;
    height: 112%;
  }

  .rec-particle-copy {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 10px;
    max-width: none;
    padding: 10px;
  }

  .rec-particle-copy strong {
    font-size: 22px;
  }

  .rec-hero-signal {
    min-height: 176px;
    padding: 12px;
  }

  .rec-hero-signal img {
    right: -12px;
    width: 64%;
  }

  .rec-hero-particles {
    width: 68%;
  }

  .rec-hero-signal > div:not(.rec-hero-particles):last-child {
    max-width: 52%;
  }

  .rec-hero-signal strong {
    font-size: 20px;
  }
}

@media (max-width: 390px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .flip-card,
  .card-library-card {
    min-height: 248px;
  }
  .card-library-card .card-front {
    grid-template-rows: 158px minmax(78px, auto);
    min-height: 248px;
  }
  .card-library-card .card-front img,
  .card img {
    height: 158px;
  }
  .rec-insight {
    min-height: 150px;
  }
  .rec-particle-stage {
    min-height: 286px;
  }
  .rec-hero-signal {
    min-height: 160px;
  }
  .rec-hero-signal strong {
    font-size: 18px;
  }
  .board {
    gap: 2px;
    padding: 5px;
  }
  .slot {
    padding: 2px;
  }
  .slot-avatar {
    width: min(7.6vw, 28px);
    height: min(7.6vw, 28px);
  }
  .slot-main strong,
  .empty-slot b,
  .empty-slot .empty {
    font-size: 9px;
  }
  .slot-equip-chip,
  .equip-add {
    min-height: 14px;
  }
  .slot-equip-chip {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }
  .slot-equips {
    grid-template-columns: repeat(3, minmax(0, 14px));
  }
  .equip-add {
    width: 14px;
    height: 14px;
    min-height: 14px;
    flex-basis: 14px;
  }
}

@media (max-width: 540px) {
  .board-area .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0;
    border: 1px solid rgba(48, 70, 100, 0.12);
    border-radius: 8px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(14px);
  }

  .board-area .metrics div {
    min-height: 50px;
    border-color: rgba(48, 70, 100, 0.12);
    padding: 7px 6px;
    text-align: center;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: none;
  }

  .board-area .metrics div:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 58px;
    text-align: left;
    background:
      linear-gradient(135deg, rgba(255, 244, 214, 0.72), rgba(238, 247, 255, 0.64)),
      rgba(255, 255, 255, 0.72);
  }

  .board-area .metrics span {
    font-size: 12px;
  }

  .board-area .metrics strong {
    margin-top: 2px;
    font-size: 23px;
    line-height: 1;
  }

  .board-area .metrics div:first-child strong {
    font-size: 34px;
  }

  .slot.filled {
    overflow: hidden;
  }

  .slot-equips {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1px;
    max-width: 100%;
    margin-top: 1px;
  }

  .slot-equip-chip,
  .equip-add {
    width: 13px;
    height: 13px;
    min-height: 13px;
    flex: 0 0 13px;
    border-radius: 999px;
  }

  .equip-add::before {
    font-size: 10px;
  }

  .lineup-summary {
    margin-bottom: 8px;
  }

  .lineup-summary-card {
    padding: 9px;
  }

  .lineup-summary-card header {
    margin-bottom: 8px;
  }

  .lineup-summary-card header strong {
    font-size: 15px;
  }

  .lineup-summary-card header em {
    padding: 4px 8px;
    font-size: 12px;
  }

  .lineup-summary-units {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .lineup-summary-unit {
    grid-template-columns: 34px minmax(0, 1fr) minmax(56px, auto);
    gap: 7px;
    padding: 6px;
  }

  .lineup-summary-unit > img {
    width: 34px;
    height: 34px;
    border-radius: 7px;
  }

  .lineup-summary-unit strong {
    font-size: 13px;
  }

  .lineup-summary-unit p {
    font-size: 11px;
  }

  .summary-equips span {
    width: 18px;
    height: 18px;
  }

  .summary-equips small {
    font-size: 10px;
  }
}

@media (max-width: 390px) {
  .slot-equip-chip,
  .equip-add {
    width: 12px;
    height: 12px;
    min-height: 12px;
    flex-basis: 12px;
  }
}
