:root {
  --bg: #10131f;
  --panel: #1b2031;
  --panel-2: #242b40;
  --text: #f6f1e8;
  --muted: #aeb6c8;
  --gold: #f5c15d;
  --cyan: #68d8d6;
  --red: #ef6f6c;
  --green: #78d37f;
  --line: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(245, 193, 93, 0.26), transparent 28%),
    radial-gradient(circle at 18% 16%, rgba(104, 216, 214, 0.2), transparent 28%),
    radial-gradient(circle at 86% 10%, rgba(239, 111, 108, 0.14), transparent 26%),
    linear-gradient(180deg, #101728, #080a12 76%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.85), transparent 80%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 92px;
}

.hidden {
  display: none !important;
}

.panel,
.auth-card,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 32, 49, 0.92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.auth {
  margin-top: 40px;
  padding: 28px 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 34px;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.subtitle,
.hint,
.message {
  color: var(--muted);
  line-height: 1.65;
}

.disclaimer,
.privacy-note,
.game-disclaimer {
  border: 1px solid rgba(245, 193, 93, 0.32);
  border-radius: 8px;
  padding: 9px 10px;
  color: rgba(246, 241, 232, 0.86);
  background: rgba(245, 193, 93, 0.08);
  font-size: 12px;
  line-height: 1.55;
}

.privacy-note {
  border-color: rgba(104, 216, 214, 0.26);
  background: rgba(104, 216, 214, 0.08);
}

.game-disclaimer {
  margin: 12px 4px 78px;
  text-align: center;
}

.disclaimer.compact {
  margin: 10px 0;
  padding: 7px 9px;
  font-size: 11px;
}

.auth-card {
  padding: 14px;
}

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

.segmented button,
.ghost,
.secondary,
.tab,
.close {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel-2);
  border-radius: 8px;
  min-height: 40px;
}

.segmented button.active,
.tab.active {
  border-color: rgba(245, 193, 93, 0.7);
  color: #201607;
  background: var(--gold);
}

label {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #111827;
}

.primary,
.secondary {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 700;
}

.primary {
  color: #1f1608;
  background: linear-gradient(180deg, #ffe08d, #f5b944);
}

.secondary {
  border: 1px solid rgba(104, 216, 214, 0.55);
  color: var(--text);
  background: rgba(104, 216, 214, 0.12);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.large {
  min-height: 54px;
  font-size: 18px;
}

.topbar,
.section-head {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-head h3 {
  margin-bottom: 0;
  white-space: nowrap;
  line-height: 1.15;
}

.section-head select,
.section-head .secondary {
  min-width: 0;
}

.ghost {
  min-width: 64px;
  padding: 0 12px;
}

.help-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(245, 193, 93, 0.56);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(27, 32, 49, 0.86);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 18px rgba(245, 193, 93, 0.12);
}

.help-button:active {
  transform: translateY(1px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.stats div {
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
  background: rgba(36, 43, 64, 0.88);
}

.stats span {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
}

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

.page {
  display: none;
}

.page.active {
  display: block;
}

.pack-stage {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 18px 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 20%, rgba(104, 216, 214, 0.22), transparent 32%),
    linear-gradient(180deg, rgba(32, 40, 66, 0.92), rgba(15, 18, 31, 0.94));
  box-shadow: inset 0 0 46px rgba(104, 216, 214, 0.08), 0 20px 58px rgba(0, 0, 0, 0.3);
}

.point-badge {
  position: absolute;
  right: 9px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #201607;
  font-weight: 900;
  background: var(--gold);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  z-index: 2;
}

.formula-box {
  margin: 12px 0;
  border: 1px solid rgba(245, 193, 93, 0.45);
  border-radius: 8px;
  padding: 12px;
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  background: rgba(245, 193, 93, 0.08);
}

.stage-aura {
  position: absolute;
  left: 50%;
  top: 34px;
  width: 260px;
  height: 260px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent, rgba(104,216,214,0.4), transparent, rgba(245,193,93,0.36), transparent);
  filter: blur(1px);
  opacity: 0.64;
  animation: auraSpin 9s linear infinite;
}

.stage-aura::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: inherit;
  background: rgba(16, 19, 31, 0.86);
}

.spark-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.spark-field i {
  position: absolute;
  width: 4px;
  height: 18px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(245,193,93,0.9), rgba(104,216,214,0));
  opacity: 0.48;
  animation: sparkFloat 4.8s ease-in-out infinite;
}

.spark-field i:nth-child(1) { left: 14%; top: 58%; animation-delay: -0.4s; }
.spark-field i:nth-child(2) { left: 28%; top: 20%; animation-delay: -1.3s; }
.spark-field i:nth-child(3) { left: 48%; top: 72%; animation-delay: -2.1s; }
.spark-field i:nth-child(4) { left: 68%; top: 24%; animation-delay: -0.9s; }
.spark-field i:nth-child(5) { left: 82%; top: 52%; animation-delay: -2.8s; }
.spark-field i:nth-child(6) { left: 38%; top: 44%; animation-delay: -3.6s; }

.portal-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 234px;
  height: 234px;
  margin: 8px auto 14px;
}

.portal-ring::before,
.portal-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.portal-ring::before {
  inset: 10px;
  border: 1px solid rgba(104, 216, 214, 0.42);
  border-top-color: rgba(245, 193, 93, 0.95);
  border-bottom-color: rgba(239, 111, 108, 0.62);
  box-shadow: 0 0 38px rgba(104, 216, 214, 0.22);
  animation: rotateSpin 7s linear infinite;
}

.portal-ring::after {
  inset: 38px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  animation: reverseSpin 10s linear infinite;
}

.crystal,
.poster-crystal {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 184px;
  margin: 0;
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  transform: rotate(0deg);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.64), transparent 24%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(104, 216, 214, 0.86), rgba(245, 193, 93, 0.92)),
    #68d8d6;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), 0 0 34px rgba(104, 216, 214, 0.42), inset 0 0 24px rgba(255, 255, 255, 0.28);
}

.crystal::before,
.crystal::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.48);
}

.crystal::after {
  inset: -10px;
  border-radius: 12px;
  border-color: rgba(245, 193, 93, 0.32);
  filter: blur(1px);
}

.crystal span {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  color: #1f1608;
  font-size: 20px;
  font-weight: 900;
  transform: rotate(0deg);
}

.crystal.opening {
  animation: charge 0.72s ease-in-out infinite;
}

.crystal.reveal {
  animation: reveal 0.9s cubic-bezier(.18,.88,.22,1.12);
}

.rarity-preview-normal {
  border-color: rgba(255,255,255,0.74);
  background:
    linear-gradient(150deg, rgba(255,255,255,0.26), transparent 34%),
    linear-gradient(180deg, #3a4054, #171b2a);
  animation: cardRarityPulse 1.6s ease-in-out infinite;
}

.rarity-preview-rare {
  border-color: rgba(104,216,214,0.95);
  background:
    radial-gradient(circle at 50% 24%, rgba(255,255,255,0.66), transparent 22%),
    linear-gradient(150deg, #68d8d6, #1a5f90 58%, #151b2b);
  animation: cardRarityPulse 1.35s ease-in-out infinite;
}

.rarity-preview-epic {
  border-color: rgba(177,124,255,0.98);
  background:
    radial-gradient(circle at 50% 24%, rgba(255,255,255,0.62), transparent 22%),
    linear-gradient(150deg, #b17cff, #3150b9 58%, #151123);
  animation: cardRarityPulse 1.15s ease-in-out infinite;
}

.rarity-preview-legend {
  border-color: rgba(245,193,93,1);
  background:
    radial-gradient(circle at 50% 24%, rgba(255,255,255,0.86), transparent 23%),
    linear-gradient(150deg, #ffe08d, #f5b944 48%, #8d3328);
  animation: cardRarityPulse 0.95s ease-in-out infinite;
}

.rarity-preview-hidden {
  border-color: rgba(239,111,108,1);
  background:
    radial-gradient(circle at 50% 22%, rgba(255,255,255,0.76), transparent 22%),
    linear-gradient(150deg, #ef6f6c, #6c2f8f 46%, #0b0710);
  animation: hiddenRarityPulse 0.78s ease-in-out infinite;
}

.pack-stage.charging .stage-aura {
  opacity: 1;
  animation-duration: 2.2s;
}

.pack-stage.charging .portal-ring::before {
  animation-duration: 1.2s;
  box-shadow: 0 0 54px rgba(104, 216, 214, 0.46);
}

.pack-stage.charging .spark-field i {
  opacity: 0.95;
  animation-duration: 1.6s;
}

.pack-stage.rarity-phase .stage-aura {
  opacity: 1;
  animation-duration: 1.4s;
}

.pack-stage.rarity-phase .portal-ring::before {
  inset: 2px;
  animation-duration: 0.9s;
}

.pack-stage.rarity-phase .spark-field i {
  opacity: 1;
  animation-duration: 1.1s;
}

.pack-stage.rarity-phase-normal {
  box-shadow: inset 0 0 54px rgba(255,255,255,0.1), 0 20px 58px rgba(0,0,0,0.3);
}

.pack-stage.rarity-phase-rare {
  box-shadow: inset 0 0 64px rgba(104,216,214,0.28), 0 20px 58px rgba(0,0,0,0.3);
}

.pack-stage.rarity-phase-epic {
  box-shadow: inset 0 0 68px rgba(177,124,255,0.32), 0 20px 58px rgba(0,0,0,0.3);
}

.pack-stage.rarity-phase-legend {
  box-shadow: inset 0 0 76px rgba(245,193,93,0.36), 0 20px 58px rgba(0,0,0,0.3);
}

.pack-stage.rarity-phase-hidden {
  box-shadow: inset 0 0 82px rgba(239,111,108,0.42), 0 20px 58px rgba(0,0,0,0.3);
}

.pack-stage.burst {
  animation: stageShake 0.42s ease-out;
}

.pack-stage.burst::after {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.95), rgba(245,193,93,0.44) 18%, transparent 48%);
  pointer-events: none;
  animation: burstFlash 0.72s ease-out forwards;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes charge {
  0% { transform: translateY(0) scale(1); filter: brightness(1) saturate(1); }
  45% { transform: translateY(-5px) scale(1.08); filter: brightness(1.45) saturate(1.3); }
  100% { transform: translateY(0) scale(1); filter: brightness(1) saturate(1); }
}

@keyframes reveal {
  0% { transform: rotate(0deg) scale(0.82); filter: brightness(1); opacity: 0.72; }
  52% { transform: rotate(0deg) scale(1.18); filter: brightness(2.2); opacity: 1; }
  100% { transform: rotate(0deg) scale(1); filter: brightness(1.14); opacity: 1; }
}

@keyframes cardRarityPulse {
  0%, 100% { transform: translateY(0) scale(1); filter: brightness(1) saturate(1); }
  46% { transform: translateY(-4px) scale(1.05); filter: brightness(1.45) saturate(1.34); }
}

@keyframes hiddenRarityPulse {
  0%, 100% { transform: translateY(0) scale(1); filter: brightness(1) hue-rotate(0deg); }
  42% { transform: translateY(-5px) scale(1.07); filter: brightness(1.65) hue-rotate(22deg); }
}

@keyframes slowSpin {
  to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes auraSpin {
  to { transform: translateX(-50%) rotate(360deg); }
}

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

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

@keyframes sparkFloat {
  0%, 100% { transform: translateY(18px) rotate(18deg); opacity: 0.2; }
  48% { transform: translateY(-24px) rotate(18deg); opacity: 0.88; }
}

@keyframes stageShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  42% { transform: translateX(4px); }
  64% { transform: translateX(-2px); }
}

@keyframes burstFlash {
  0% { opacity: 0; transform: scale(0.72); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.35); }
}

.rarity-glow-normal { box-shadow: 0 0 28px rgba(255,255,255,0.24); }
.rarity-glow-rare { box-shadow: 0 0 38px rgba(104,216,214,0.62); }
.rarity-glow-epic { box-shadow: 0 0 46px rgba(177,124,255,0.78); }
.rarity-glow-legend { box-shadow: 0 0 56px rgba(245,193,93,0.9); }
.rarity-glow-hidden { box-shadow: 0 0 64px rgba(239,111,108,0.95); }

.event-panel {
  margin-bottom: 12px;
  border: 1px solid rgba(245, 193, 93, 0.36);
  border-radius: 8px;
  padding: 14px;
  background:
    radial-gradient(circle at 16% 10%, rgba(245,193,93,0.18), transparent 28%),
    rgba(27, 32, 49, 0.9);
}

.challenge-box {
  display: grid;
  gap: 10px;
}

.challenge-card h4 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.challenge-card p {
  color: var(--muted);
  line-height: 1.6;
}

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

.choice-button {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  border: 1px solid rgba(104,216,214,0.42);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  text-align: left;
  background: rgba(104,216,214,0.09);
}

.choice-button b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #201607;
  background: var(--gold);
}

.choice-button span {
  line-height: 1.35;
}

.challenge-done,
.choice-log,
.effect-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(36, 43, 64, 0.72);
}

.challenge-done p,
.choice-log span,
.effect-list p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.choice-log small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
}

.challenge-result {
  display: grid;
  gap: 10px;
}

.challenge-result > p {
  color: var(--muted);
  line-height: 1.6;
}

.reward-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reward-chips span {
  border: 1px solid rgba(245,193,93,0.48);
  border-radius: 99px;
  padding: 6px 10px;
  color: #ffe4a2;
  background: rgba(245,193,93,0.12);
  font-size: 13px;
  font-weight: 800;
}

.goal-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(27, 32, 49, 0.82);
}

.section-head.compact {
  margin-bottom: 10px;
}

.section-head.compact h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.section-head.compact span {
  color: var(--muted);
  font-size: 12px;
}

.task-list,
.series-list {
  display: grid;
  gap: 10px;
}

.task-row,
.series-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(36, 43, 64, 0.72);
}

.task-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.task-row.done,
.series-row.done {
  border-color: rgba(120, 211, 127, 0.58);
  background: rgba(120, 211, 127, 0.1);
}

.task-row.claimable {
  border-color: rgba(255, 205, 92, 0.78);
}

.task-claim {
  min-width: 78px;
  padding: 8px 14px;
}

.task-row strong,
.series-row strong {
  display: block;
  margin-bottom: 3px;
}

.task-row small,
.series-row small {
  color: var(--muted);
}

.bar {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
}

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

.page-action {
  margin-top: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1070 / 1536;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  cursor: pointer;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.08), transparent 35%),
    var(--panel);
}

.card > strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  line-height: 1.2;
}

.card > small {
  display: block;
  font-size: 11px;
  line-height: 1.25;
}

.card > p {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-card {
  aspect-ratio: auto;
  min-height: 292px;
  padding: 14px;
  transform-style: preserve-3d;
  animation: cardSummon 0.72s cubic-bezier(.16,.9,.24,1.08);
}

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

.pack-result-card {
  position: relative;
  min-height: 218px;
  padding: 10px;
}

.pack-choice-card {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.pack-choice-card.selected {
  border-color: #4cd3c2;
  box-shadow: 0 0 0 2px rgba(76, 211, 194, 0.28), 0 0 26px rgba(76, 211, 194, 0.22);
  transform: translateY(-2px);
}

.choice-mark {
  position: absolute;
  z-index: 2;
  top: 36px;
  right: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(12, 16, 27, 0.72);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ownership-mark {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 6px 16px rgba(7, 29, 90, 0.12);
}

.ownership-mark.new {
  color: #fff;
  background: linear-gradient(135deg, #ff3d73, #ff6d3d);
}

.ownership-mark.new::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.28);
}

.ownership-mark.owned {
  color: #52658f;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(82, 101, 143, 0.18);
}

.pack-choice-card.selected .choice-mark {
  background: #4cd3c2;
  color: #071015;
}

.pack-result-card .image-card-face,
.pack-result-card .card-art {
  width: 100%;
  min-height: 92px;
  max-height: 128px;
  overflow: hidden;
}

.pack-result-card .image-card-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pack-result-card > strong {
  font-size: 14px;
}

.pack-result-card > small,
.pack-result-card > p {
  font-size: 11px;
}

.point-badge {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255,255,255,0.72);
  border-radius: 999px;
  background: linear-gradient(135deg, #f8c75e, #fff1af);
  color: #141824;
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
  font-size: 16px;
  font-weight: 900;
}

.puzzle-summary {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  text-align: left;
}

.puzzle-summary strong {
  display: block;
  margin-bottom: 4px;
  color: #f8c75e;
}

.puzzle-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.puzzle-summary.success {
  border-color: rgba(76, 211, 194, 0.5);
  background: rgba(76, 211, 194, 0.12);
}

.puzzle-summary.failed {
  border-color: rgba(255,255,255,0.1);
}

.special-result-card {
  padding: 10px;
}

.special-result-card .image-card-face {
  width: min(100%, 330px);
  margin: 0 auto;
}

.special-result-card > strong,
.special-result-card > small,
.special-result-card > p {
  display: none;
}

.result-showcase {
  text-align: center;
}

@keyframes cardPop {
  0% { transform: translateY(12px) scale(0.96); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes cardSummon {
  0% { transform: translateY(26px) rotateY(88deg) scale(0.82); opacity: 0; filter: brightness(1.8); }
  58% { transform: translateY(-8px) rotateY(-8deg) scale(1.04); opacity: 1; }
  100% { transform: translateY(0) rotateY(0) scale(1); opacity: 1; filter: brightness(1); }
}

.card.locked {
  border-color: rgba(255,255,255,0.1);
  opacity: 1;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.06), transparent 34%),
    #1a1d27;
  filter: grayscale(1);
}

.card-action {
  flex: 0 0 auto;
  width: 100%;
  margin-top: 8px;
  min-height: 34px;
  font-size: 12px;
}

.card-art {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 52%;
  height: auto;
  margin-bottom: 9px;
  border-radius: 8px;
  color: #201607;
  font-size: 38px;
  font-weight: 900;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.96), transparent 24%),
    linear-gradient(140deg, var(--cyan), var(--gold));
  box-shadow: inset 0 0 28px rgba(255,255,255,0.24);
}

.locked-card-back {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  color: rgba(255,255,255,0.48);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 36%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 8px, transparent 8px 16px),
    #252936;
}

.locked-card-back span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid rgba(255,255,255,0.22);
  border-radius: 50%;
  font-size: 30px;
  font-weight: 900;
}

.locked-card-back small {
  font-size: 13px;
  font-weight: 800;
}

.special-card-face {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 3px solid #f5c15d;
  border-radius: 8px;
  padding: 16px 14px 12px;
  color: #fff7d7;
  background:
    radial-gradient(circle at 78% 34%, rgba(239,111,108,0.6), transparent 18%),
    radial-gradient(circle at 26% 44%, rgba(245,193,93,0.44), transparent 24%),
    linear-gradient(180deg, rgba(24,18,44,0.95) 0%, rgba(24,18,44,0.95) 58%, #f5edd8 58%, #f5edd8 86%, #171226 86%, #171226 100%);
  box-shadow: inset 0 0 24px rgba(255,255,255,0.2), 0 0 26px rgba(245,193,93,0.32);
}

.image-card-face {
  display: grid;
  place-items: center;
  width: 100%;
  height: auto;
  aspect-ratio: 1070 / 1536;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #090a0f;
}

.image-card-face img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.special-card-frame {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255,255,255,0.34);
  border-radius: 6px;
  pointer-events: none;
}

.special-card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 3px solid #f5c15d;
  border-radius: 14px;
  color: #fff3b0;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(145deg, #5222a8, #9d48ff);
  box-shadow: 0 4px 14px rgba(0,0,0,0.32);
}

.special-card-series {
  position: absolute;
  right: 14px;
  top: 14px;
  border: 1px solid rgba(245,193,93,0.78);
  border-radius: 6px;
  padding: 5px 9px;
  color: #fff6d7;
  font-size: 13px;
  font-weight: 800;
  background: rgba(20,15,31,0.72);
}

.special-card-face h4 {
  margin: 46px 0 4px;
  color: #fff1ba;
  font-size: 34px;
  line-height: 1;
  text-align: center;
  text-shadow: 0 3px 0 rgba(0,0,0,0.42), 0 0 18px rgba(245,193,93,0.44);
}

.special-card-quote {
  margin: 0 0 12px;
  color: #fff7dc;
  text-align: center;
  font-size: 15px;
}

.special-card-scene {
  position: relative;
  height: 148px;
  overflow: hidden;
  border-radius: 6px;
  background:
    radial-gradient(circle at 72% 52%, rgba(239,111,108,0.55), transparent 20%),
    linear-gradient(135deg, #283044, #171927 48%, #493021);
}

.special-card-scene::before,
.special-card-scene::after {
  content: "";
  position: absolute;
  width: 92px;
  height: 18px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(245,193,93,0.96), transparent);
  filter: blur(1px);
}

.special-card-scene::before {
  left: 28px;
  bottom: 44px;
  transform: rotate(-28deg);
}

.special-card-scene::after {
  right: 38px;
  top: 78px;
  transform: rotate(18deg);
}

.hp {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #f6e9ae;
  font-size: 12px;
  font-weight: 900;
}

.hp span {
  display: block;
  width: 58px;
  height: 9px;
  border: 1px solid #111;
  background: linear-gradient(90deg, #e24d3f 0%, #e24d3f 22%, #111 22%);
}

.hp-left { left: 20px; top: 58px; }
.hp-right { right: 26px; top: 36px; }

.slash {
  position: absolute;
  height: 3px;
  border-radius: 99px;
  background: #ffd46d;
  box-shadow: 0 0 18px #ffd46d;
}

.slash-a {
  left: 40px;
  top: 98px;
  width: 150px;
  transform: rotate(-18deg);
}

.slash-b {
  left: 74px;
  top: 104px;
  width: 126px;
  transform: rotate(18deg);
}

.special-card-scene strong {
  position: absolute;
  right: 48px;
  top: 82px;
  color: #ff5a46;
  font-size: 30px;
  text-shadow: 0 2px 0 #1b0d0d;
}

.special-card-desc {
  min-height: 132px;
  padding: 12px 14px;
  color: #171313;
  text-align: left;
}

.special-card-desc b {
  display: inline-block;
  margin-bottom: 6px;
  border-radius: 4px;
  padding: 4px 9px;
  color: #fff2b6;
  background: #5b3aa0;
}

.special-card-desc p {
  margin: 0 0 10px;
  color: #171313;
  font-size: 14px;
  line-height: 1.45;
}

.special-card-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
}

.special-card-footer span:last-child {
  text-align: right;
}

.special-album-card .special-card-face {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-width: 2px;
  padding: 10px;
  background:
    radial-gradient(circle at 76% 38%, rgba(239,111,108,0.55), transparent 20%),
    radial-gradient(circle at 30% 52%, rgba(245,193,93,0.38), transparent 24%),
    linear-gradient(180deg, rgba(24,18,44,0.98) 0%, rgba(24,18,44,0.98) 100%);
}

.special-album-card .image-card-face {
  flex: 0 0 70%;
  height: 70%;
  aspect-ratio: auto;
  border: 0;
  padding: 0;
  background: #090a0f;
}

.special-album-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px;
}

.special-album-card .image-card-face img {
  width: 100%;
  height: 100%;
}

.special-album-card > strong {
  margin: 0;
  font-size: 15px;
  line-height: 1.18;
}

.special-album-card > small {
  font-size: 11px;
  line-height: 1.25;
  color: var(--muted);
}

.special-album-card > p {
  margin: 0;
  font-size: 11px;
  line-height: 1.24;
  -webkit-line-clamp: 2;
}

.card-detail {
  display: grid;
  gap: 12px;
}

.detail-card {
  width: min(100%, 340px);
  margin: 0 auto;
  cursor: default;
}

.detail-card.locked {
  min-height: 430px;
}

.detail-visual {
  width: min(100%, 360px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.detail-visual .image-card-face {
  width: 100%;
  height: auto;
  aspect-ratio: 1070 / 1536;
}

.detail-visual .image-card-face img {
  width: 100%;
  height: auto;
}

.detail-visual .card-art,
.detail-visual .locked-card-back {
  min-height: 420px;
}

.detail-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.detail-meta strong {
  color: var(--text);
  font-size: 20px;
}

.detail-meta p {
  margin: 0;
}

.special-album-card .special-card-badge {
  left: 9px;
  top: 9px;
  width: 40px;
  height: 40px;
  border-width: 2px;
  border-radius: 10px;
  font-size: 12px;
}

.special-album-card .special-card-series,
.special-album-card .special-card-quote,
.special-album-card .special-card-desc,
.special-album-card .special-card-footer {
  display: none;
}

.special-album-card .special-card-face h4 {
  margin: 52px 0 8px;
  font-size: 22px;
  line-height: 1.1;
}

.special-album-card .special-card-scene {
  height: calc(100% - 92px);
  min-height: 92px;
}

.special-album-card .hp {
  font-size: 10px;
}

.special-album-card .hp span {
  width: 44px;
  height: 7px;
}

.special-album-card .hp-left {
  left: 12px;
  top: 46px;
}

.special-album-card .hp-right {
  right: 12px;
  top: 24px;
}

.special-album-card .slash-a {
  left: 22px;
  top: 76px;
  width: 112px;
}

.special-album-card .slash-b {
  left: 44px;
  top: 82px;
  width: 94px;
}

.special-album-card .special-card-scene strong {
  right: 22px;
  top: 70px;
  font-size: 24px;
}

.card-shine {
  position: absolute;
  inset: -40%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.46) 48%, transparent 60%);
  transform: translateX(-60%) rotate(8deg);
  animation: shineSweep 1.35s ease-out 0.18s forwards;
}

@keyframes shineSweep {
  to { transform: translateX(60%) rotate(8deg); opacity: 0; }
}

.card strong {
  display: block;
  margin-bottom: 5px;
}

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

.card > p {
  display: block;
  width: 100%;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rarity-normal { border-color: rgba(255,255,255,0.18); }
.rarity-rare { border-color: rgba(104,216,214,0.7); box-shadow: 0 0 20px rgba(104,216,214,0.14); }
.rarity-epic { border-color: rgba(177,124,255,0.8); box-shadow: 0 0 24px rgba(177,124,255,0.2); }
.rarity-legend { border-color: rgba(245,193,93,0.9); box-shadow: 0 0 30px rgba(245,193,93,0.26); }
.rarity-hidden { border-color: rgba(239,111,108,0.95); box-shadow: 0 0 34px rgba(239,111,108,0.3); }

.rarity-rare .card-art {
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.96), transparent 24%), linear-gradient(140deg, #8ef1ef, #5ab9ff);
}

.rarity-epic .card-art {
  color: #fff;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.8), transparent 24%), linear-gradient(140deg, #b17cff, #68d8d6);
}

.rarity-legend .card-art {
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.96), transparent 24%), linear-gradient(140deg, #fff0a8, #f5b944 55%, #ef6f6c);
}

.rarity-hidden .card-art {
  color: #fff;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.74), transparent 24%), linear-gradient(140deg, #221429, #ef6f6c 52%, #f5c15d);
}

.ranking {
  display: grid;
  gap: 8px;
}

.rank-contact-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  align-items: end;
  margin-bottom: 10px;
  border: 2px solid rgba(27, 95, 201, 0.5);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--comic-shadow);
}

.rank-contact-panel label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--blue);
  font-size: 16px;
  font-weight: 900;
}

.rank-contact-panel label::before {
  content: none;
}

.rank-contact-panel label::after {
  content: none !important;
}

.rank-contact-panel label em {
  color: #6a7898;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
}

.rank-contact-panel label span {
  color: var(--blue);
  font-size: 16px;
  line-height: 1.1;
}

.rank-contact-panel input {
  width: 100%;
  min-width: 0;
  border: 2px solid rgba(27, 95, 201, 0.52);
  border-radius: 10px;
  min-height: 40px;
  padding: 6px 10px;
  color: var(--blue);
  background: #fff;
  font-size: 18px;
  font-weight: 900;
}

.rank-contact-panel input::placeholder {
  font-size: 13px;
  font-weight: 700;
}

.rank-contact-panel small {
  grid-column: 1 / -1;
  color: #6a7898;
  font-size: 12px;
  font-weight: 700;
}

.rank-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--panel);
}

.rank-row b {
  color: var(--gold);
}

.reward-list,
.share-card-preview {
  margin: 12px 0;
  border: 1px solid rgba(245, 193, 93, 0.42);
  border-radius: 8px;
  padding: 12px;
  background: rgba(245, 193, 93, 0.08);
}

.reward-list p {
  margin-bottom: 4px;
  color: var(--green);
}

.guide {
  display: grid;
  gap: 12px;
}

.guide h3 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.25;
}

.guide-lead,
.guide-ranking p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.guide-grid div,
.guide-ranking {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(36, 43, 64, 0.72);
}

.guide-grid strong,
.guide-ranking strong {
  color: #ffe4a2;
}

.guide-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.share-card-preview {
  text-align: center;
}

.share-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.share-link-text {
  margin: 10px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  color: var(--muted);
  background: rgba(15, 18, 31, 0.72);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.share-mini-card {
  position: relative;
  display: grid;
  align-content: end;
  gap: 8px;
  width: 168px;
  height: 236px;
  margin: 10px auto 14px;
  overflow: hidden;
  border: 2px solid rgba(245, 193, 93, 0.78);
  border-radius: 8px;
  padding: 14px;
  text-align: left;
  background:
    radial-gradient(circle at 50% 22%, rgba(255,255,255,0.88), transparent 22%),
    linear-gradient(150deg, rgba(104,216,214,0.92), rgba(245,193,93,0.88) 56%, rgba(239,111,108,0.72)),
    #242b40;
  box-shadow: 0 16px 34px rgba(0,0,0,0.34), inset 0 0 28px rgba(255,255,255,0.2);
}

.share-mini-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255,255,255,0.48);
  border-radius: 6px;
}

.share-mini-card span,
.share-mini-card strong {
  position: relative;
  z-index: 1;
}

.share-mini-card span {
  color: rgba(31, 22, 8, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.share-mini-card strong {
  color: #201607;
  font-size: 22px;
  line-height: 1.15;
}

.share-feature-card {
  position: relative;
  width: min(240px, 76vw);
  margin: 10px auto 14px;
  border: 3px solid rgba(245, 193, 93, 0.82);
  border-radius: 16px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(255, 246, 186, 0.92), rgba(255, 221, 132, 0.82));
  box-shadow: 0 18px 34px rgba(27, 95, 201, 0.18), 0 0 24px rgba(245, 193, 93, 0.28);
}

.share-feature-card.rarity-hidden {
  border-color: rgba(239, 111, 108, 0.92);
  background: linear-gradient(135deg, rgba(255, 215, 229, 0.94), rgba(190, 224, 255, 0.86));
  box-shadow: 0 18px 34px rgba(27, 95, 201, 0.18), 0 0 28px rgba(239, 111, 108, 0.34);
}

.share-feature-card .preview-card-face {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 2px solid rgba(116, 157, 226, 0.72);
  border-radius: 12px;
  background: linear-gradient(135deg, #dff4ff 0%, #eef7ff 48%, #ffe2f4 100%);
}

.share-feature-card .preview-card-face > img,
.share-feature-card .preview-card-face > .preview-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.share-rank-badge {
  position: absolute;
  left: 50%;
  bottom: -10px;
  z-index: 3;
  transform: translateX(-50%);
  padding: 5px 12px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff6eb5, #1b5fc9);
  box-shadow: 0 8px 18px rgba(27, 95, 201, 0.24);
  font-size: 13px;
  font-weight: 1000;
  white-space: nowrap;
}

.share-card-preview h3 {
  margin-bottom: 12px;
}

.rank-share-copy {
  margin: 12px auto 8px;
  max-width: 420px;
  border: 2px solid rgba(255, 110, 181, 0.5);
  border-radius: 16px;
  padding: 18px 16px;
  color: var(--blue);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 110, 181, 0.18), transparent 28%),
    radial-gradient(circle at 88% 20%, rgba(50, 186, 245, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,251,255,0.96));
  box-shadow: 0 10px 24px rgba(27, 95, 201, 0.12);
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 1000;
  line-height: 1.35;
}

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

.tabs {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 460px);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: rgba(13, 16, 26, 0.94);
}

.tabs .tab {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0 8px;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 800;
}

.modal {
  position: fixed;
  z-index: 5000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
}

.close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  min-height: 36px;
}

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

.share-page {
  margin-top: 38px;
  padding: 24px 18px;
  text-align: center;
  color: #fff;
}

.share-poster {
  margin: 18px 0;
  border: 1px solid rgba(245, 193, 93, 0.45);
  border-radius: 8px;
  padding: 18px;
  background: #242b40;
}

.share-poster h2 {
  color: #fff;
  text-shadow: 0 2px 0 rgba(6, 28, 88, 0.45);
}

.share-page .eyebrow,
.share-page h1,
.share-page p,
.share-page .message,
.share-page .share-disclaimer {
  color: #fff;
}

.poster-crystal {
  width: 118px;
  height: 166px;
  margin: 8px auto 16px;
}

.link-button {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.poster-body {
  background:
    radial-gradient(circle at 50% 18%, rgba(245, 245, 255, 0.92), rgba(137, 91, 255, 0.5) 8%, transparent 20%),
    radial-gradient(circle at 15% 20%, rgba(104, 216, 214, 0.28), transparent 28%),
    radial-gradient(circle at 84% 70%, rgba(153, 96, 255, 0.3), transparent 30%),
    linear-gradient(180deg, #111a2c, #090b12 72%);
}

.poster-app {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 32px;
}

.campaign-poster {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 28px 22px 30px;
  text-align: center;
  background:
    linear-gradient(120deg, transparent 0%, transparent 48%, rgba(255,255,255,0.12) 49%, rgba(255,255,255,0.12) 50%, transparent 51%),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.74) 0%, rgba(128, 91, 255, 0.56) 8%, transparent 22%),
    radial-gradient(circle at 25% 78%, rgba(104, 216, 214, 0.23), transparent 24%),
    radial-gradient(circle at 74% 68%, rgba(239, 111, 108, 0.2), transparent 24%),
    linear-gradient(180deg, rgba(32, 41, 70, 0.96), rgba(9, 11, 18, 0.98));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

.campaign-poster::before,
.campaign-poster::after {
  content: "";
  position: absolute;
  inset: auto;
  width: 180px;
  height: 260px;
  background: linear-gradient(160deg, rgba(255,255,255,0.18), rgba(104,216,214,0.08));
  clip-path: polygon(18% 0, 100% 28%, 62% 100%, 0 68%);
  opacity: 0.72;
}

.campaign-poster::before {
  left: -70px;
  top: 110px;
  transform: rotate(-16deg);
}

.campaign-poster::after {
  right: -78px;
  top: 330px;
  transform: rotate(22deg);
}

.poster-badge {
  position: relative;
  z-index: 1;
  width: max-content;
  margin: 0 auto 90px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  padding: 7px 14px;
  color: #19110a;
  font-weight: 900;
  background: linear-gradient(180deg, #ffffff, #ffd1b7);
  transform: rotate(-4deg);
}

.rift {
  position: absolute;
  left: 50%;
  top: 72px;
  width: 190px;
  height: 190px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    conic-gradient(from 30deg, rgba(255,255,255,0.95), rgba(124,89,255,0.5), rgba(16,19,31,0.1), rgba(255,255,255,0.9)),
    radial-gradient(circle, #fff 0%, #fff 8%, rgba(144, 116, 255, 0.82) 9%, rgba(144, 116, 255, 0.82) 28%, transparent 42%);
  filter: blur(0.2px);
  box-shadow: 0 0 42px rgba(162, 127, 255, 0.62);
}

.campaign-poster h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  color: #fff;
  font-size: 52px;
  line-height: 1.08;
  text-shadow: 0 5px 0 rgba(0,0,0,0.42), 0 0 26px rgba(255,255,255,0.24);
}

.campaign-poster h2 {
  position: relative;
  z-index: 1;
  margin-bottom: 26px;
  color: #ff756e;
  font-size: 28px;
  text-shadow: 0 4px 0 rgba(0,0,0,0.36);
}

.poster-copy,
.poster-slogan {
  position: relative;
  z-index: 1;
  color: rgba(246, 241, 232, 0.88);
  line-height: 1.7;
}

.qr-panel {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 188px;
  height: 188px;
  margin: 42px auto 14px;
  border: 8px solid #fff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}

.qr-panel img {
  width: 100%;
  height: 100%;
}

.scan-text {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 8px;
  font-size: 26px;
  text-shadow: 0 4px 0 rgba(0,0,0,0.45);
}

.poster-slogan {
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 800;
}

.poster-tools {
  margin-top: 12px;
  padding: 14px;
}

.poster-tools .secondary,
.poster-tools .primary {
  margin-top: 8px;
}

.intro-overlay,
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.cg-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: #000;
}

.cg-video {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #000;
}

.cg-skip {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 2;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 99px;
  padding: 9px 14px;
  color: #fff;
  background: rgba(15,18,31,0.72);
}

.cg-skip:disabled {
  opacity: 0.62;
}

.intro-overlay {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 18%, rgba(245,193,93,0.24), transparent 22%),
    radial-gradient(circle at 18% 72%, rgba(104,216,214,0.18), transparent 28%),
    linear-gradient(180deg, #070912, #12182a 55%, #05060b);
}

.intro-stars {
  position: absolute;
  inset: 0;
  opacity: 0.62;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.96) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(245,193,93,0.72) 0 1px, transparent 1.5px);
  background-position: 0 0, 18px 26px;
  background-size: 44px 44px, 72px 72px;
  animation: starDrift 15s linear infinite;
}

.intro-gate {
  position: absolute;
  bottom: -80px;
  left: 50%;
  width: min(82vw, 360px);
  height: 420px;
  transform: translateX(-50%);
  border: 2px solid rgba(245,193,93,0.56);
  border-bottom: 0;
  border-radius: 180px 180px 0 0;
  background:
    radial-gradient(circle at 50% 26%, rgba(255,255,255,0.2), transparent 18%),
    linear-gradient(90deg, rgba(245,193,93,0.08), rgba(104,216,214,0.1), rgba(245,193,93,0.08));
  box-shadow: 0 0 70px rgba(245,193,93,0.22), inset 0 0 40px rgba(255,255,255,0.08);
  animation: gateOpen 15s ease-in-out forwards;
}

.intro-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  text-align: center;
  animation: introFloat 4s ease-in-out infinite;
}

.intro-copy h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.22;
  text-shadow: 0 0 28px rgba(245,193,93,0.34);
}

.intro-copy p:last-child {
  margin: 0;
  color: rgba(246,241,232,0.86);
  font-size: 16px;
  line-height: 1.8;
}

.intro-skip {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 2;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 99px;
  padding: 9px 14px;
  color: #fff;
  background: rgba(15,18,31,0.72);
}

.intro-skip:disabled {
  opacity: 0.62;
}

@keyframes starDrift {
  to { background-position: 0 120px, 18px 170px; }
}

@keyframes gateOpen {
  0% { transform: translateX(-50%) scale(0.82); opacity: 0.28; }
  45% { opacity: 0.72; }
  100% { transform: translateX(-50%) scale(1.08); opacity: 1; }
}

@keyframes introFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: rgba(3, 5, 11, 0.64);
}

.tour-spotlight {
  position: fixed;
  z-index: 6001;
  border: 2px solid var(--gold);
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(3,5,11,0.68), 0 0 28px rgba(245,193,93,0.5);
  transition: all 0.24s ease;
}

.tour-card {
  position: fixed;
  left: 18px;
  right: 18px;
  z-index: 6002;
  display: grid;
  gap: 9px;
  max-width: 420px;
  margin: 0 auto;
  border: 1px solid rgba(245,193,93,0.5);
  border-radius: 8px;
  padding: 14px;
  background: rgba(27,32,49,0.96);
  box-shadow: 0 18px 50px rgba(0,0,0,0.42);
}

body.intro-active .tabs,
body.tour-hide-tabs .tabs {
  display: none;
}

.tour-card.standalone {
  left: 22px;
  right: 22px;
  transform: translateY(-50%);
  text-align: center;
}

.tour-card h3,
.tour-card p {
  margin: 0;
}

.tour-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

/* Light visual skin based on the provided Guangzai card mockups. */
:root {
  --bg: #edf8ff;
  --panel: #ffffff;
  --panel-2: #eef6ff;
  --text: #071d5a;
  --muted: #4f6b9a;
  --gold: #ffd35b;
  --cyan: #32baf5;
  --red: #ff65a5;
  --green: #3acb9c;
  --line: rgba(42, 118, 223, 0.28);
  --blue: #0d3f9f;
  --pink: #ff6eb5;
  --soft-blue: #dff3ff;
  --comic-shadow: 0 8px 0 rgba(7, 29, 90, 0.08), 0 18px 38px rgba(34, 107, 207, 0.13);
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 111, 181, 0.22), transparent 25%),
    radial-gradient(circle at 88% 8%, rgba(50, 186, 245, 0.2), transparent 30%),
    linear-gradient(180deg, #e7f8ff 0%, #f9fdff 48%, #edf7ff 100%);
}

body::before {
  opacity: 0.75;
  background-image:
    radial-gradient(circle, rgba(13, 63, 159, 0.12) 0 2px, transparent 2.5px),
    linear-gradient(135deg, transparent 0 46%, rgba(255, 110, 181, 0.13) 46% 50%, transparent 50%),
    linear-gradient(90deg, rgba(42, 118, 223, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(42, 118, 223, 0.07) 1px, transparent 1px);
  background-size: 22px 22px, 180px 180px, 42px 42px, 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.8), transparent 92%);
}

.app {
  width: min(100%, 520px);
  padding: 18px 14px 104px;
}

.panel,
.auth-card,
.modal-card,
.pack-stage,
.goal-panel,
.stats div,
.card,
.rank-row,
.task-row,
.series-row,
.guide-grid div,
.guide-ranking,
.share-card-preview,
.reward-list {
  border: 2px solid rgba(27, 95, 201, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--comic-shadow);
}

.eyebrow {
  color: var(--pink);
  font-weight: 900;
}

.auth {
  position: relative;
  overflow: hidden;
  min-height: min(920px, calc(100vh - 36px));
  margin-top: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.auth::before {
  content: none;
}

.auth > .eyebrow,
.auth > h1,
.auth .subtitle {
  display: none;
}

.auth > .disclaimer {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2;
  margin: 0;
  border: 2px solid rgba(7, 29, 90, 0.36);
  border-radius: 12px;
  padding: 8px 10px;
  color: rgba(7, 29, 90, 0.78);
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
  backdrop-filter: blur(4px);
}

.auth-card {
  position: absolute;
  left: 9.5%;
  right: 9.5%;
  top: 42.6%;
  z-index: 1;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0 3.2%;
  background: transparent;
  box-shadow: none;
}

.segmented {
  position: relative;
  gap: 0;
  height: clamp(56px, 13vw, 76px);
  margin: 0 0 clamp(20px, 5vw, 34px);
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.segmented button,
.ghost,
.secondary,
.tab,
.close,
.help-button {
  border: 2px solid rgba(27, 95, 201, 0.72);
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 4px 0 rgba(13, 63, 159, 0.12);
}

.segmented button {
  position: relative;
  border: 4px solid #07131f;
  border-radius: 0;
  color: #fff;
  min-height: 100%;
  background:
    radial-gradient(circle at 26% 20%, rgba(255,255,255,0.62), transparent 24%),
    repeating-radial-gradient(circle at 20% 18%, rgba(255,255,255,0.34) 0 2px, transparent 2px 7px),
    linear-gradient(135deg, #ff67ad, #f03f98);
  font-size: clamp(24px, 7vw, 38px);
  font-weight: 1000;
  text-shadow:
    3px 3px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000;
  transform: skew(-8deg);
  box-shadow: 6px 7px 0 #06141d, 0 0 0 5px #fff;
}

.segmented button.active {
  color: #fff9a6;
  filter: brightness(1.08) saturate(1.16);
  transform: skew(-8deg) translateY(-5px);
}

.segmented button:not(.active) {
  color: #fff;
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,0.66), transparent 24%),
    repeating-radial-gradient(circle at 20% 18%, rgba(255,255,255,0.36) 0 2px, transparent 2px 7px),
    linear-gradient(135deg, #66e5ff, #168ad8);
  opacity: 0.92;
}

.segmented button span,
.segmented button {
  line-height: 1;
}

label {
  position: relative;
  color: var(--blue);
  font-weight: 900;
  gap: 6px;
  margin: clamp(14px, 4.4vw, 24px) 0;
  font-size: 0;
}

label::before {
  content: "";
  position: absolute;
  left: -3%;
  top: -12px;
  z-index: 1;
  width: 26%;
  height: 28px;
  background: #31bee8;
  border: 3px solid #07131f;
  transform: skew(-10deg);
  box-shadow: 4px 5px 0 #06141d, 0 0 0 4px #fff;
}

label:first-of-type::after,
label:nth-of-type(2)::after {
  position: absolute;
  left: 2%;
  top: -8px;
  z-index: 2;
  color: #fff;
  font-size: 13px;
  font-weight: 1000;
  text-shadow: 2px 2px 0 #07131f;
}

label:first-of-type::after {
  content: "账号";
}

label:nth-of-type(2)::after {
  content: "密码";
}

input,
select {
  border: 4px solid #07131f;
  border-radius: 0;
  color: var(--text);
  background: #ffffff;
  box-shadow: 6px 7px 0 #063340, inset 0 0 0 3px #fff, inset 0 -5px 0 rgba(50, 186, 245, 0.14);
}

.auth input {
  min-height: clamp(54px, 12vw, 70px);
  padding: 0 18px;
  font-size: 16px;
  font-weight: 900;
}

.primary {
  border: 3px solid #f4a516;
  border-radius: 14px;
  color: #2a2400;
  background: linear-gradient(180deg, #fff4a8, #ffc84e);
  box-shadow: 0 6px 0 #f0a018, 0 12px 24px rgba(255, 164, 25, 0.28);
}

.secondary {
  color: var(--blue);
  background: linear-gradient(180deg, #ffffff, #e9f6ff);
}

.auth .privacy-note {
  margin: 8px 0 10px;
  border: 2px solid rgba(7, 29, 90, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  color: rgba(7, 29, 90, 0.72);
  background: rgba(255,255,255,0.72);
  font-size: 11px;
}

.auth #authSubmit {
  min-height: clamp(62px, 14vw, 86px);
  margin-top: 8px;
  border: 5px solid #07131f;
  border-radius: 0;
  color: #fff;
  background:
    repeating-radial-gradient(circle at 24% 24%, rgba(255,255,255,0.34) 0 2px, transparent 2px 8px),
    linear-gradient(135deg, #ff57a9 0%, #35d9ff 68%, #18a3d7 100%);
  box-shadow: 7px 9px 0 #063340, 0 0 0 6px #fff;
  font-size: clamp(24px, 7vw, 38px);
  font-weight: 1000;
  text-shadow:
    4px 4px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000;
  transform: skew(-6deg);
}

.auth #authSubmit::after {
  content: " GO!";
  color: #ffe85d;
}

.auth #authMessage {
  min-height: 20px;
  margin: 12px 0 0;
  color: #c92165;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.disclaimer,
.privacy-note,
.game-disclaimer {
  border-color: rgba(27, 95, 201, 0.36);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

.topbar {
  position: relative;
  margin-bottom: 14px;
  border: 2px solid rgba(27, 95, 201, 0.56);
  border-radius: 16px;
  padding: 22px 12px 12px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 110, 181, 0.18), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(50, 186, 245, 0.22), transparent 28%),
    linear-gradient(120deg, rgba(255,255,255,0.96), rgba(221,246,255,0.96));
  box-shadow: var(--comic-shadow);
}

.topbar::before {
  content: "光仔卡牌";
  position: absolute;
  left: 14px;
  top: -20px;
  padding: 2px 8px 4px;
  color: #fff;
  font-size: 28px;
  font-weight: 1000;
  text-shadow:
    3px 3px 0 #071d5a,
    -2px -2px 0 #071d5a,
    2px -2px 0 #071d5a,
    -2px 2px 0 #071d5a,
    0 5px 0 var(--pink);
  transform: rotate(-3deg);
}

.topbar h2 {
  margin-top: 8px;
  color: var(--blue);
  font-size: 28px;
  font-weight: 1000;
}

.help-button {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  color: var(--blue);
  background: #fff;
}

.ghost {
  min-height: 52px;
  border-radius: 12px;
  font-weight: 900;
}

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

.stats div {
  position: relative;
  min-height: 86px;
  padding: 14px 10px 10px 74px;
  text-align: left;
  background: #fff;
}

.stats div::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 2px solid rgba(27, 95, 201, 0.5);
  border-radius: 12px;
  background:
    radial-gradient(circle at 52% 42%, #fff 0 8px, transparent 9px),
    linear-gradient(135deg, #8dd8ff, #ff9bd0);
  box-shadow: 0 4px 0 rgba(13, 63, 159, 0.14);
}

.stats span {
  color: var(--blue);
  font-size: 30px;
  line-height: 1;
}

.stats small {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.pack-stage {
  min-height: 480px;
  padding: 36px 18px 32px;
  color: var(--blue);
  background:
    radial-gradient(circle at 50% 22%, rgba(50, 186, 245, 0.2), transparent 28%),
    radial-gradient(circle at 72% 34%, rgba(255, 110, 181, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(245,251,255,0.98));
}

.pack-stage::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(27, 95, 201, 0.22);
  border-radius: 18px;
  pointer-events: none;
}

.stage-aura {
  top: 44px;
  width: 310px;
  height: 310px;
  background:
    conic-gradient(from 0deg, transparent, rgba(50,186,245,0.48), transparent, rgba(255,110,181,0.44), transparent);
}

.stage-aura::after {
  background: rgba(255, 255, 255, 0.52);
}

.portal-ring {
  width: 250px;
  height: 250px;
  margin-top: 10px;
}

.portal-ring::before {
  border-color: rgba(27, 95, 201, 0.24);
  border-left-color: var(--pink);
  border-right-color: var(--cyan);
  box-shadow: none;
}

.portal-ring::after {
  border-color: rgba(27, 95, 201, 0.2);
}

.crystal,
.poster-crystal {
  width: 132px;
  height: 184px;
  border: 3px solid #071d5a;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0)),
    url("./assets/ui/pack-card-clean.png") center / cover no-repeat,
    linear-gradient(180deg, #afe6ff, #ffadd7);
  box-shadow: 0 10px 0 rgba(13,63,159,0.12), 0 18px 34px rgba(50, 186, 245, 0.22);
}

.crystal span {
  color: var(--blue);
  font-size: 42px;
  text-shadow: 0 2px 0 #fff;
}

.pack-stage h3 {
  color: var(--blue);
  font-size: 34px;
  font-weight: 1000;
}

.pack-copy,
.hint {
  color: var(--blue);
  font-weight: 800;
}

.pack-stage .hint {
  margin-top: 18px;
  padding-top: 4px;
}

.goal-panel {
  padding: 16px;
  background:
    radial-gradient(circle at 95% 20%, rgba(255, 110, 181, 0.16), transparent 22%),
    #ffffff;
}

.section-head h3,
.section-head.compact h3 {
  color: var(--blue);
  font-size: 24px;
  font-weight: 1000;
}

.section-head.compact span {
  color: var(--muted);
  font-weight: 800;
}

.task-row,
.series-row,
.rank-row {
  border-width: 2px;
  background: linear-gradient(180deg, #ffffff, #f3fbff);
}

.task-row.done,
.series-row.done {
  border-color: rgba(58, 203, 156, 0.72);
  background: linear-gradient(180deg, #ffffff, #eafff8);
}

.task-row strong,
.series-row strong {
  color: var(--blue);
  font-weight: 1000;
}

.bar {
  height: 10px;
  background: rgba(42, 118, 223, 0.12);
}

.bar span {
  background: linear-gradient(90deg, #34c7ff, #ff6eb5);
}

.card-grid {
  gap: 12px;
}

.card {
  border-color: rgba(27, 95, 201, 0.62);
  color: var(--text);
  background:
    radial-gradient(circle at 92% 8%, rgba(255,110,181,0.16), transparent 20%),
    linear-gradient(180deg, #ffffff, #f0f8ff);
}

.card-art {
  color: var(--blue);
  background:
    radial-gradient(circle at 50% 42%, #fff 0 18px, transparent 19px),
    linear-gradient(135deg, #91dcff, #ffafd9);
  border: 2px solid rgba(27, 95, 201, 0.38);
}

.card-art-mark {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 10px, transparent 11px),
    conic-gradient(from 45deg, transparent 0 12%, rgba(255,255,255,0.95) 12% 18%, transparent 18% 50%, rgba(255,255,255,0.95) 50% 56%, transparent 56% 100%),
    linear-gradient(135deg, #8dd8ff, #ff9bd0);
  box-shadow: 0 0 24px rgba(255,255,255,0.8), 0 8px 20px rgba(27,95,201,0.18);
  transform: rotate(45deg);
}

.card > strong,
.detail-meta strong {
  color: var(--blue);
  font-weight: 1000;
}

.card-meta {
  display: flex !important;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.source-badge {
  display: inline-grid;
  place-items: center;
  max-width: 100%;
  border: 1px solid rgba(255, 110, 181, 0.68);
  border-radius: 999px;
  padding: 2px 7px;
  color: #fff;
  background: linear-gradient(135deg, #ff6eb5, #32baf5);
  font-size: 10px;
  font-weight: 1000;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(7, 29, 90, 0.35);
}

.card small,
.card p,
.detail-meta,
.detail-meta p,
.puzzle-summary p {
  color: var(--muted);
}

.card.locked {
  border-color: rgba(27, 95, 201, 0.32);
  background: linear-gradient(180deg, #f3f6fb, #e3edf7);
  filter: grayscale(0.9);
}

.locked-card-back {
  border-color: rgba(27, 95, 201, 0.22);
  color: rgba(7, 29, 90, 0.45);
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,0.7) 0 20px, transparent 21px),
    repeating-linear-gradient(45deg, rgba(42,118,223,0.06) 0 8px, transparent 8px 16px),
    linear-gradient(135deg, #d9e8ff, #f1f7ff);
}

.pack-choice-card.selected {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 110, 181, 0.22), var(--comic-shadow);
}

.pack-choice-warning {
  margin: 8px 0 10px;
  border: 2px solid rgba(255, 110, 181, 0.72);
  border-radius: 12px;
  padding: 8px 10px;
  color: #b81f62;
  background: rgba(255, 239, 247, 0.94);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.choice-mark {
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  top: 36px;
  right: 8px;
}

.ownership-mark.new {
  color: #fff;
  background: linear-gradient(135deg, #ff4d88, #ff7a3d);
}

.ownership-mark.owned {
  color: #6b789b;
  background: rgba(255, 255, 255, 0.92);
}

.pack-choice-card.selected .choice-mark {
  background: var(--pink);
  color: #fff;
}

.point-badge {
  border-color: #071d5a;
  background: linear-gradient(135deg, #ffe977, #ffb13b);
  color: var(--blue);
}

.puzzle-summary,
.formula-box {
  border-color: rgba(27, 95, 201, 0.35);
  color: var(--blue);
  background: #f5fbff;
}

.puzzle-summary strong {
  color: var(--blue);
}

.puzzle-summary.success {
  border-color: rgba(58, 203, 156, 0.72);
  background: #eafff8;
}

.pack-result-card .preview-card-face {
  position: relative;
  width: 100%;
  height: clamp(138px, 34vw, 176px);
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  overflow: hidden;
  border: 2px solid rgba(116, 157, 226, 0.72);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,0.88), transparent 30%),
    linear-gradient(135deg, #dff4ff 0%, #eef7ff 48%, #ffe2f4 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.76), 0 10px 22px rgba(27,95,201,0.12);
}

.pack-result-card .preview-card-face > img,
.pack-result-card .preview-card-face > .preview-placeholder {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.pack-result-card .preview-placeholder {
  min-height: 100%;
  max-height: none;
}

.preview-card-info {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border: 1px solid rgba(255,255,255,0.68);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 14px rgba(27,95,201,0.1);
  text-align: left;
}

.preview-card-info strong {
  overflow: hidden;
  color: var(--blue);
  font-size: clamp(12px, 3.5vw, 14px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-card-info .card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  color: #6b789b;
  font-size: clamp(8px, 2.35vw, 10px);
  line-height: 1.1;
  flex-wrap: nowrap !important;
  white-space: nowrap;
}

.preview-card-info .card-meta span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-card-info .source-badge {
  flex: 0 0 auto;
  padding: 1px 4px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff6eb5, #83c7ff);
  font-size: clamp(8px, 2.2vw, 9px);
  line-height: 1.15;
  white-space: nowrap;
}

.preview-card-info p {
  margin: 0;
  overflow: hidden;
  color: #6b789b;
  font-size: clamp(9px, 2.8vw, 11px);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-mini-status {
  margin: 6px 0 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.rank-row b {
  color: var(--pink);
}

/* Rarity frame colors: keep the artwork visible, make quality readable from the frame. */
.card.rarity-normal,
.detail-visual.rarity-normal {
  border-color: rgba(116, 157, 226, 0.76);
  box-shadow: 0 8px 18px rgba(27, 95, 201, 0.1);
}

.card.rarity-rare,
.detail-visual.rarity-rare {
  border-color: #38c9de;
  box-shadow: 0 0 0 1px rgba(56, 201, 222, 0.2), 0 12px 24px rgba(56, 201, 222, 0.2);
}

.card.rarity-epic,
.detail-visual.rarity-epic {
  border-color: #a875ff;
  box-shadow: 0 0 0 1px rgba(168, 117, 255, 0.22), 0 12px 26px rgba(168, 117, 255, 0.24);
}

.card.rarity-legend,
.detail-visual.rarity-legend {
  border-color: #f4b83f;
  box-shadow: 0 0 0 1px rgba(244, 184, 63, 0.28), 0 14px 32px rgba(244, 184, 63, 0.34);
}

.card.rarity-hidden,
.detail-visual.rarity-hidden {
  border-color: #ff5da8;
  box-shadow: 0 0 0 1px rgba(255, 93, 168, 0.3), 0 14px 34px rgba(255, 93, 168, 0.34);
}

.rarity-normal .preview-card-face,
.rarity-normal .image-card-face {
  border-color: rgba(116, 157, 226, 0.72);
}

.rarity-rare .preview-card-face,
.rarity-rare .image-card-face {
  border-color: #38c9de;
  background: linear-gradient(135deg, #dfffff 0%, #e9f9ff 48%, #d6f4ff 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8), 0 10px 24px rgba(56, 201, 222, 0.22);
}

.rarity-epic .preview-card-face,
.rarity-epic .image-card-face {
  border-color: #a875ff;
  background: linear-gradient(135deg, #efe5ff 0%, #f7f1ff 48%, #ffe1f5 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8), 0 10px 26px rgba(168, 117, 255, 0.24);
}

.rarity-legend .preview-card-face,
.rarity-legend .image-card-face {
  border-color: #f4b83f;
  background: linear-gradient(135deg, #fff4b8 0%, #fff8df 45%, #ffd6a4 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.84), 0 12px 30px rgba(244, 184, 63, 0.35);
}

.rarity-hidden .preview-card-face,
.rarity-hidden .image-card-face {
  border-color: #ff5da8;
  background: linear-gradient(135deg, #2b245f 0%, #5b2f80 42%, #ff8ebc 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7), 0 12px 32px rgba(255, 93, 168, 0.38);
}

.rarity-rare .preview-card-info {
  border-color: rgba(56, 201, 222, 0.72);
}

.rarity-epic .preview-card-info {
  border-color: rgba(168, 117, 255, 0.72);
}

.rarity-legend .preview-card-info {
  border-color: rgba(244, 184, 63, 0.85);
  background: rgba(255, 248, 223, 0.76);
}

.rarity-hidden .preview-card-info {
  border-color: rgba(255, 93, 168, 0.82);
  background: rgba(255, 240, 248, 0.78);
}

.rarity-normal .source-badge {
  background: linear-gradient(135deg, #8bb5ff, #70d4ff);
}

.rarity-rare .source-badge {
  background: linear-gradient(135deg, #12b7cf, #73e8e6);
}

.rarity-epic .source-badge {
  background: linear-gradient(135deg, #8d63ff, #d68cff);
}

.rarity-legend .source-badge {
  color: #4a2d00;
  background: linear-gradient(135deg, #ffe17c, #f4b83f);
}

.rarity-hidden .source-badge {
  background: linear-gradient(135deg, #161129, #ff5da8);
}

.tabs {
  gap: 0;
  width: min(100%, 520px);
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  border: 2px solid rgba(27, 95, 201, 0.5);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 -8px 24px rgba(34, 107, 207, 0.14);
}

.tabs .tab {
  border: 0;
  border-radius: 22px;
  color: var(--blue);
  background: transparent;
  box-shadow: none;
}

.tabs .tab.active {
  color: var(--blue);
  background:
    radial-gradient(circle at 18% 30%, rgba(255,255,255,0.72), transparent 20%),
    linear-gradient(135deg, #b9e8ff, #8dcfff);
  box-shadow: inset 0 0 0 2px rgba(27, 95, 201, 0.22);
}

.modal {
  background: rgba(29, 78, 145, 0.28);
  backdrop-filter: blur(3px);
}

.modal-card {
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
}

.intro-overlay {
  color: var(--text);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 110, 181, 0.22), transparent 24%),
    radial-gradient(circle at 18% 72%, rgba(50, 186, 245, 0.22), transparent 30%),
    linear-gradient(180deg, #effaff, #ffffff 62%, #eaf6ff);
}

.intro-copy h2 {
  color: var(--blue);
  text-shadow: none;
}

.intro-copy p:last-child {
  color: var(--muted);
}

.intro-gate {
  border-color: rgba(27, 95, 201, 0.38);
  background: linear-gradient(90deg, rgba(255,110,181,0.08), rgba(50,186,245,0.12), rgba(255,110,181,0.08));
  box-shadow: 0 0 70px rgba(50,186,245,0.16), inset 0 0 40px rgba(255,255,255,0.7);
}

.intro-skip {
  color: var(--blue);
  background: rgba(255,255,255,0.86);
}

.tour-overlay {
  background: rgba(12, 46, 105, 0.32);
}

.tour-spotlight {
  border-color: var(--pink);
  box-shadow: 0 0 0 9999px rgba(12,46,105,0.42), 0 0 28px rgba(255,110,181,0.45);
}

.tour-card {
  color: var(--text);
  background: rgba(255,255,255,0.97);
}

.tour-card p:not(.eyebrow) {
  color: var(--muted);
}

@media (max-width: 390px) {
  .auth::before {
    font-size: 40px;
  }

  .stats div {
    padding-left: 62px;
  }

  .stats div::before {
    width: 38px;
    height: 38px;
  }
}

.poster-body {
  background: #e4f7ff;
}

.poster-app {
  width: min(100%, 430px);
  padding: 0 10px 28px;
}

.campaign-poster {
  aspect-ratio: 1100 / 1672;
  min-height: auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  background: url("./assets/ui/share-poster-baked.png") center / 100% 100% no-repeat;
  box-shadow: 0 18px 42px rgba(35, 108, 181, 0.18);
}

.campaign-poster::before,
.campaign-poster::after,
.campaign-poster .rift {
  display: none;
}

.poster-badge {
  display: none;
}

.campaign-poster h1 {
  display: none;
}

.campaign-poster h2 {
  display: none;
}

.poster-copy {
  display: none;
}

.qr-panel {
  position: absolute;
  right: 7%;
  top: 39%;
  z-index: 10;
  width: 23%;
  height: auto;
  aspect-ratio: 1;
  margin: 0;
  border: 7px solid #fff;
  border-radius: 12px;
  background: #fff;
  box-shadow: 5px 7px 0 rgba(7, 19, 31, 0.28);
  transform: rotate(7.5deg);
}

.qr-panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.scan-text {
  display: none;
}

.poster-slogan {
  display: none;
}

.poster-disclaimer {
  display: none;
}

/* Clean login and pack-screen overrides: keep the comic style, remove baked-in fake UI. */
.auth {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: min(920px, calc(100vh - 36px));
  margin-top: 0;
  border: 10px solid #fff;
  border-radius: 0;
  padding: clamp(24px, 7vw, 46px) clamp(18px, 5vw, 30px) 24px;
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 102, 176, 0.28), transparent 24%),
    radial-gradient(circle at 86% 6%, rgba(50, 186, 245, 0.28), transparent 26%),
    radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.86), transparent 42%),
    repeating-radial-gradient(circle at 12% 18%, rgba(7, 29, 90, 0.08) 0 2px, transparent 2px 10px),
    linear-gradient(180deg, #c8f0ff 0%, #f8fcff 62%, #e9f7ff 100%);
  box-shadow: 0 22px 60px rgba(27, 95, 201, 0.2);
}

.auth::before {
  content: "光仔卡牌";
  display: block;
  order: 1;
  width: fit-content;
  max-width: 100%;
  margin: 8px auto 0;
  padding: 8px 14px 12px;
  color: #fffef7;
  font-size: clamp(44px, 13vw, 76px);
  font-weight: 1000;
  line-height: 0.92;
  letter-spacing: 0;
  text-align: center;
  text-shadow:
    5px 5px 0 #07131f,
    -3px -3px 0 #07131f,
    3px -3px 0 #07131f,
    -3px 3px 0 #07131f,
    0 9px 0 var(--pink);
  transform: rotate(-2deg);
}

.auth::after {
  content: "POW!";
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 0;
  padding: 8px 10px;
  color: #33d9ff;
  background: #fff;
  border: 4px solid #07131f;
  border-radius: 18px;
  font-size: 20px;
  font-weight: 1000;
  text-shadow: 2px 2px 0 #ff57a9;
  transform: rotate(-12deg);
  box-shadow: 4px 5px 0 #07131f;
}

.auth > .eyebrow,
.auth > h1 {
  display: none;
}

.auth .subtitle {
  display: block;
  order: 2;
  max-width: 410px;
  margin: 0 auto 4px;
  border: 4px solid #07131f;
  border-radius: 0;
  padding: 12px 14px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 5px 6px 0 #35d9ff, 0 0 0 5px rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.58;
}

.auth-card {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  z-index: 1;
  order: 10;
  width: 100%;
  max-width: 410px;
  margin: 2px auto 0;
  padding: 0;
}

.auth > .disclaimer {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  order: 20;
  max-width: 410px;
  margin: 4px auto 0;
}

.auth .privacy-note {
  margin-top: 12px;
}

.auth #authSubmit {
  margin-top: 14px;
}

.auth-card .segmented {
  height: clamp(44px, 10vw, 60px);
  margin-bottom: clamp(12px, 3.2vw, 20px);
}

.auth-card .segmented button {
  border-width: 3px;
  box-shadow: 4px 5px 0 #06141d, 0 0 0 4px #fff;
  font-size: clamp(20px, 5.6vw, 30px);
}

.auth-card label {
  margin: clamp(7px, 2.2vw, 12px) 0;
}

.auth-card label::before {
  top: -10px;
  width: 18%;
  height: 22px;
  border-width: 2px;
  box-shadow: 3px 4px 0 #06141d, 0 0 0 3px #fff;
}

.auth-card label:first-of-type::after,
.auth-card label:nth-of-type(2)::after {
  top: -7px;
  left: 1.8%;
  font-size: 15px;
}

.auth-card input {
  min-height: clamp(44px, 9.8vw, 54px);
  padding: 10px 14px 6px;
  border-width: 3px;
  box-shadow: 4px 5px 0 #063340, inset 0 0 0 2px #fff, inset 0 -4px 0 rgba(50, 186, 245, 0.12);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.2;
}

.auth-card input::placeholder {
  font-size: 12px;
  font-weight: 700;
}

.auth-card .privacy-note {
  margin: 9px 0 8px;
  padding: 6px 9px;
  font-size: 10px;
  line-height: 1.45;
}

.auth-card #authSubmit {
  min-height: clamp(52px, 11vw, 66px);
  margin-top: 10px;
  border-width: 4px;
  box-shadow: 5px 6px 0 #063340, 0 0 0 5px #fff;
  font-size: clamp(20px, 5.6vw, 30px);
}

@media (hover: none), (max-width: 640px) {
  .stage-aura,
  .spark-field i,
  .portal-ring::before,
  .portal-ring::after,
  .intro-stars,
  .intro-gate,
  .intro-copy {
    animation: none !important;
  }

  .stage-aura,
  .crystal::after {
    filter: none;
  }

  .card-shine {
    display: none;
  }

  .modal,
  .preview-card-info,
  .tour-overlay {
    backdrop-filter: none;
  }
}

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

.pack-stage {
  min-height: 650px;
  padding: 54px 18px 46px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.96), transparent 24%),
    radial-gradient(circle at 50% 22%, rgba(50, 186, 245, 0.22), transparent 30%),
    radial-gradient(circle at 72% 34%, rgba(255, 110, 181, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 255, 0.99));
}

.pack-stage::before {
  left: 16px;
  right: 16px;
  top: 16px;
  bottom: auto;
  height: 340px;
  border: 2px solid rgba(135, 181, 245, 0.42);
  border-radius: 22px;
  box-shadow: inset 0 0 34px rgba(27, 95, 201, 0.08);
}

.stage-aura {
  top: 52px;
  width: min(340px, 82vw);
  height: min(340px, 82vw);
  opacity: 0.92;
}

.portal-ring {
  width: min(340px, 82vw);
  height: min(340px, 82vw);
  margin: 0 auto 34px;
}

.crystal,
.poster-crystal {
  width: 150px;
  height: 210px;
  border: 3px solid #0b25b6;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.58), rgba(255,255,255,0)),
    url("./assets/ui/pack-card-clean.png") center / cover no-repeat,
    linear-gradient(180deg, #bde9ff, #ffb2d8);
  box-shadow:
    0 0 0 5px rgba(255,255,255,0.82),
    0 12px 0 rgba(13,63,159,0.1),
    0 22px 40px rgba(50, 186, 245, 0.22);
}

.crystal span {
  display: none;
}

.pack-stage h3 {
  margin-top: 2px;
}

.pack-stage .primary.large {
  position: relative;
  z-index: 2;
  display: block;
  width: min(82%, 330px);
  margin: 26px auto 0;
}

.pack-stage .hint {
  margin-top: 26px;
  padding-top: 0;
}
