:root {
  color-scheme: dark;
  --ink: #071d45;
  --ink-2: #0b2d64;
  --paper: #f4ead1;
  --paper-2: #fff8e5;
  --gold: #dcb35b;
  --cyan: #7ec7df;
  --chalk: #f8f4e8;
  --muted: rgba(248, 244, 232, 0.72);
  --panel: rgba(7, 29, 69, 0.76);
  --line: rgba(248, 244, 232, 0.22);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  font-family:
    "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-anchor: none;
  color: var(--chalk);
  background:
    linear-gradient(180deg, rgba(7, 29, 69, 0.08), rgba(4, 12, 28, 0.78)),
    url("./assets/tactics-board.webp") center / cover fixed,
    var(--ink);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 16% 12%, rgba(126, 199, 223, 0.2), transparent 24rem),
    radial-gradient(circle at 86% 18%, rgba(220, 179, 91, 0.18), transparent 22rem),
    linear-gradient(180deg, rgba(2, 8, 22, 0.06), rgba(2, 8, 22, 0.64));
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.app-shell {
  width: min(1180px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 18px calc(86px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
  backdrop-filter: blur(12px);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.topbar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold);
}

.topbar-username {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-link,
.icon-button {
  display: inline-flex;
  align-items: center;
  color: var(--chalk);
  background: transparent;
}

.brand-link {
  gap: 10px;
  min-width: 0;
  text-align: left;
}

.brand-link strong,
.brand-link small {
  display: block;
  overflow: hidden;
  max-width: 58vw;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-link strong {
  font-size: 16px;
}

.brand-link small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.brand-mark,
.icon-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(244, 234, 209, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0;
}

.view {
  display: none;
  animation: rise 420ms ease both;
}

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

#profile-view.is-active {
  position: absolute;
  top: 100px;
  left: 0;
  right: 0;
}

main {
  position: relative;
  min-height: calc(100dvh - 66px);
}

.home-grid {
  display: grid;
  min-height: calc(100dvh - 168px);
  align-items: center;
  gap: 22px;
  padding: 16px 0 22px;
}

.intro-panel,
.rules-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.intro-panel {
  padding: clamp(22px, 5vw, 42px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
blockquote {
  margin: 0;
}

h1 {
  max-width: 780px;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(34px, 8vw, 64px);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(24px, 6vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  font-size: 15px;
}

.lead {
  max-width: 620px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

.quick-form {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: rgba(248, 244, 232, 0.9);
  font-size: 13px;
  font-weight: 700;
}

.char-counter {
  font-size: 11px;
  font-weight: 400;
  color: rgba(248, 244, 232, 0.5);
}

.text-field {
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  border: 1px solid rgba(248, 244, 232, 0.24);
  border-radius: 8px;
  color: var(--paper-2);
  background: rgba(7, 29, 69, 0.5);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  font: inherit;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.text-field::placeholder {
  color: rgba(248, 244, 232, 0.46);
}

.text-field:focus {
  border-color: rgba(220, 179, 91, 0.78);
  background: rgba(7, 29, 69, 0.72);
  box-shadow: 0 0 0 3px rgba(220, 179, 91, 0.12);
}

.question-field {
  min-height: 92px;
  resize: vertical;
  line-height: 1.55;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgba(248, 244, 232, 0.24);
  border-radius: 999px;
  color: var(--chalk);
  background: rgba(7, 29, 69, 0.5);
  font-size: 13px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.chip.is-selected {
  border-color: rgba(220, 179, 91, 0.82);
  color: #071d45;
  background: var(--paper);
}

.cta-row,
.action-grid {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 48px;
  width: 100%;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 800;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--paper-2), var(--gold));
  box-shadow: 0 12px 26px rgba(220, 179, 91, 0.26);
}

.secondary-button {
  color: var(--paper-2);
  border: 1px solid rgba(220, 179, 91, 0.68);
  background: rgba(220, 179, 91, 0.12);
}

.ghost-button {
  color: var(--chalk);
  border: 1px solid var(--line);
  background: rgba(244, 234, 209, 0.08);
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.chip:active {
  transform: scale(0.98);
}

.feature-card {
  position: relative;
  width: min(360px, 86vw);
  margin: 0 auto;
  padding: 16px;
}

.tarot-card {
  position: relative;
  width: 100%;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.38);
  transform: rotate(-2deg);
  background: var(--paper);
}

.card-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.tarot-card::before,
.tarot-card::after {
  position: absolute;
  width: 38px;
  height: 12px;
  content: "";
  background: rgba(126, 199, 223, 0.58);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.07);
}

.tarot-card::before {
  top: 12px;
  left: -12px;
  transform: rotate(-12deg);
}

.tarot-card::after {
  right: -10px;
  bottom: 18px;
  transform: rotate(-9deg);
}

.card-frame {
  position: relative;
  display: grid;
  height: 100%;
  grid-template-rows: auto 1fr auto auto;
  gap: 10px;
  padding: 16px;
  border: 2px solid rgba(16, 33, 69, 0.24);
  border-radius: 6px;
  overflow: hidden;
}

.card-frame::before {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(16, 33, 69, 0.22);
  content: "";
  pointer-events: none;
}

.card-number {
  color: rgba(16, 33, 69, 0.58);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
}

.card-art {
  position: relative;
  min-height: 138px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 48%, rgba(220, 179, 91, 0.34), transparent 42%),
    linear-gradient(180deg, rgba(126, 199, 223, 0.16), rgba(255, 255, 255, 0.06));
  overflow: hidden;
}

.card-art::before,
.card-art::after {
  position: absolute;
  content: "";
}

.card-art::before {
  inset: 18%;
  border: 2px solid rgba(16, 33, 69, 0.28);
  border-radius: 50%;
}

.card-art::after {
  right: 16%;
  bottom: 16%;
  width: 34%;
  height: 2px;
  background: rgba(16, 33, 69, 0.42);
  transform: rotate(-24deg);
}

.sketch-player {
  position: absolute;
  left: 50%;
  top: 24%;
  width: 44px;
  height: 82px;
  transform: translateX(-50%) rotate(-5deg);
}

.sketch-player::before,
.sketch-player::after {
  position: absolute;
  left: 50%;
  content: "";
  transform: translateX(-50%);
}

.sketch-player::before {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(16, 33, 69, 0.74);
  border-radius: 50%;
}

.sketch-player::after {
  top: 30px;
  width: 36px;
  height: 46px;
  border: 3px solid rgba(16, 33, 69, 0.74);
  border-top-width: 7px;
  border-radius: 20px 20px 9px 9px;
}

.orbit {
  position: absolute;
  border: 2px dashed rgba(16, 33, 69, 0.3);
  border-radius: 50%;
}

.orbit-a {
  inset: 18px 30px;
  transform: rotate(14deg);
}

.orbit-b {
  inset: 34px 18px 28px;
  transform: rotate(-21deg);
}

.mini-ball {
  position: absolute;
  right: 22%;
  bottom: 20%;
  width: 22px;
  height: 22px;
  border: 3px solid #102145;
  border-radius: 50%;
  background: var(--paper-2);
}

.tarot-card h2 {
  align-self: end;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(22px, 7vw, 36px);
  color: #102145;
}

.tarot-card p:last-child {
  color: rgba(16, 33, 69, 0.68);
  font-size: 13px;
  line-height: 1.5;
}

.today-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 29, 69, 0.72);
}

.today-note span,
.collection-stats span {
  color: var(--muted);
  font-size: 12px;
}

.today-note strong,
.collection-stats strong {
  color: var(--paper-2);
}

.draw-stage {
  display: grid;
  min-height: calc(100dvh - 170px);
  align-content: center;
  justify-items: center;
  gap: 24px;
  text-align: center;
}

.draw-stage h2 {
  max-width: 680px;
  font-family: Georgia, "Songti SC", "SimSun", serif;
}

.deck-scene {
  position: relative;
  width: min(320px, 78vw);
  height: 230px;
}

.deck-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 128px;
  aspect-ratio: 2.5 / 3.6;
  border: 2px solid rgba(244, 234, 209, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(244, 234, 209, 0.12), transparent),
    repeating-linear-gradient(45deg, rgba(248, 244, 232, 0.18) 0 2px, transparent 2px 12px),
    #0c2f69;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.3);
  animation: shuffle 2.6s ease-in-out infinite;
}

.deck-card-a {
  transform: translate(-50%, -50%) rotate(-18deg);
}

.deck-card-b {
  transform: translate(-42%, -52%) rotate(-6deg);
  animation-delay: -0.45s;
}

.deck-card-c {
  transform: translate(-58%, -48%) rotate(8deg);
  animation-delay: -0.9s;
}

.deck-card-d {
  transform: translate(-50%, -50%) rotate(18deg);
  animation-delay: -1.3s;
}

.result-layout {
  display: grid;
  gap: 22px;
  padding: 14px 0 24px;
}

.result-card-slot {
  width: min(360px, 88vw);
  margin: 0 auto;
}

.result-copy {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 29, 69, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.result-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rarity-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(220, 179, 91, 0.72);
  border-radius: 999px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.archetype {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.question-summary {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(126, 199, 223, 0.36);
  border-radius: 8px;
  background: rgba(126, 199, 223, 0.1);
}

.question-summary:empty {
  display: none;
}

.question-summary span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.question-summary strong {
  color: var(--paper-2);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.keyword-row span {
  padding: 7px 10px;
  border: 1px solid rgba(126, 199, 223, 0.5);
  border-radius: 999px;
  color: var(--paper-2);
  background: rgba(126, 199, 223, 0.12);
  font-size: 12px;
  font-weight: 700;
}

blockquote {
  margin-top: 18px;
  padding: 14px;
  border-left: 3px solid var(--gold);
  color: var(--paper-2);
  background: rgba(244, 234, 209, 0.08);
  line-height: 1.7;
}

.fortune-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.fortune-grid article,
.collection-stats article,
.rules-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 234, 209, 0.08);
}

.fortune-grid article {
  padding: 14px;
}

.fortune-grid span {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.fortune-grid p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.62;
}

.section-heading {
  padding: 18px 0 16px;
}

.collection-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.collection-stats article {
  padding: 14px;
}

.collection-stats strong {
  display: block;
  margin-top: 5px;
}

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

.collection-card {
  min-height: 168px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--paper-2);
  background: rgba(7, 29, 69, 0.72);
}

.collection-card.is-locked {
  color: rgba(248, 244, 232, 0.46);
  background: rgba(7, 29, 69, 0.42);
}

.collection-card .mini-art {
  position: relative;
  height: 84px;
  margin-bottom: 11px;
  border-radius: 6px;
  background:
    radial-gradient(circle, rgba(220, 179, 91, 0.25), transparent 46%),
    rgba(244, 234, 209, 0.1);
}

.collection-card.is-locked .mini-art {
  filter: grayscale(1);
  opacity: 0.42;
}

.collection-card h3 {
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.collection-card p {
  color: currentColor;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.78;
}

.rules-panel {
  margin: 18px 0;
  padding: 22px;
}

.rules-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.rules-list article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px;
}

.rules-list span {
  color: var(--gold);
  font-weight: 900;
}

.rules-list p {
  color: var(--muted);
  line-height: 1.65;
}

.bottom-nav {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 30;
  display: grid;
  max-width: 520px;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid rgba(248, 244, 232, 0.18);
  border-radius: 999px;
  background: rgba(3, 13, 32, 0.82);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  min-width: 0;
  min-height: 40px;
  border-radius: 999px;
  color: rgba(248, 244, 232, 0.72);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.bottom-nav button.is-active {
  color: var(--ink);
  background: var(--paper);
}

/* ── 首页 ── */
.home-view {
  padding: 12px 0 32px;
}

.home-hero {
  padding: 24px 0 20px;
}

.home-hero h1 {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(28px, 7vw, 52px);
  line-height: 1.1;
}

.feature-card-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.feature-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--chalk);
  background: rgba(7, 29, 69, 0.72);
  text-align: left;
  transition: background 150ms ease, transform 150ms ease;
}

.feature-entry:active {
  background: rgba(7, 29, 69, 0.9);
  transform: scale(0.98);
}

.feature-icon {
  grid-row: 1 / 3;
  font-size: 28px;
  line-height: 1;
  color: var(--gold);
}

.feature-entry strong {
  font-size: 16px;
  font-weight: 800;
}

.feature-desc {
  color: var(--muted);
  font-size: 13px;
  grid-column: 2;
}

.feature-badge {
  grid-row: 1 / 3;
  padding: 6px 10px;
  border: 1px solid rgba(220, 179, 91, 0.5);
  border-radius: 999px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

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

.home-stats article {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 29, 69, 0.56);
}

.home-stats span {
  color: var(--muted);
  font-size: 11px;
}

.home-stats strong {
  color: var(--paper-2);
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 诚心求解 ── */
.ask-layout {
  padding: 20px 0 32px;
}

.ask-layout h2 {
  margin: 8px 0 0;
}

.field-group {
  display: grid;
}

/* ── 统计数值条 ── */
.stat-block {
  margin-top: 20px;
}

.stat-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.star-row {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
}

.star {
  font-size: 18px;
  color: rgba(248, 244, 232, 0.28);
  line-height: 1;
}

.star.star-on {
  color: var(--gold);
}

.stat-list {
  display: grid;
  gap: 10px;
}

.stat-item {
  display: grid;
  grid-template-columns: 68px 1fr 36px;
  align-items: center;
  gap: 10px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.stat-bar-wrap {
  height: 7px;
  border-radius: 999px;
  background: rgba(248, 244, 232, 0.12);
  overflow: hidden;
}

.stat-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  width: 0;
  transition: width 700ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-val {
  color: var(--paper-2);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

/* ── 随机抽卡 ── */
.random-stage {
  padding: 16px 0 32px;
}

.random-stage h2 {
  margin: 8px 0 24px;
}

.random-card-stage {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.random-card-back {
  position: relative;
  width: 140px;
  aspect-ratio: 2.5 / 3.6;
}

.random-result {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

.random-reading {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 29, 69, 0.78);
}

.random-texts {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.random-texts p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

@keyframes flip-in {
  from { opacity: 0; transform: rotateY(90deg); }
  to   { opacity: 1; transform: rotateY(0deg); }
}

.flip-in {
  animation: flip-in 350ms ease both;
}

/* ── 牌册 ── */
.compendium-view {
  padding-bottom: 32px;
}

.compendium-grid {
  display: grid;
  gap: 8px;
}

.compendium-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 29, 69, 0.68);
  overflow: hidden;
}

.compendium-header {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}

.comp-num {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
}

.comp-title strong {
  display: block;
  font-size: 15px;
}

.comp-title span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.comp-rarity {
  padding: 5px 9px;
  border: 1px solid rgba(220, 179, 91, 0.5);
  border-radius: 999px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.comp-chevron {
  color: var(--muted);
  font-size: 18px;
  transition: transform 250ms ease;
}

.compendium-item.is-open .comp-chevron {
  transform: rotate(90deg);
}

.compendium-body {
  display: none;
  padding: 0 16px 16px;
}

.compendium-item.is-open .compendium-body {
  display: block;
}

/* ── 个人主页 ── */
.profile-view {
  padding-bottom: 32px;
}

.profile-layout {
  padding: 0;
}
.profile-layout .section-heading {
  padding-top: 0;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.profile-stats article {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 29, 69, 0.56);
}

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

.profile-stats strong {
  color: var(--paper-2);
  font-size: 22px;
  font-weight: 800;
}

.profile-stat-link {
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.profile-stat-link:hover,
.profile-stat-link:focus-visible {
  border-color: var(--gold) !important;
  background: rgba(220, 179, 91, 0.1) !important;
  outline: none;
}

.profile-stat-link span::after {
  content: " ▸";
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.2s;
  display: inline-block;
}

.profile-stat-link[aria-expanded="true"] span::after {
  transform: rotate(90deg);
}

.profile-compendium {
  margin-top: -14px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  padding: 16px;
  background: rgba(7, 29, 69, 0.56);
  animation: fadeSlideDown 0.22s ease;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.profile-section-title {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}

.profile-today {
  margin-bottom: 28px;
}

.profile-today h3 {
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-today-inner {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 29, 69, 0.68);
}

.profile-today-copy strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.profile-today-copy .ghost-button {
  margin-top: 12px;
  min-height: 38px;
  font-size: 13px;
}

.profile-history h3 {
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.history-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 29, 69, 0.52);
}

.history-date {
  color: var(--muted);
  font-size: 12px;
}

.history-card {
  font-size: 14px;
  font-weight: 700;
}

.history-stars {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 1px;
}

.muted-text {
  color: var(--muted);
  margin-bottom: 14px;
}

.err-msg {
  color: rgba(248, 100, 100, 0.9);
  display: block;
  margin-bottom: 10px;
}

/* ── 响应式补充 ── */
@media (min-width: 700px) {
  .feature-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .random-result {
    grid-template-columns: 140px 1fr;
    align-items: start;
  }
}

@media (min-width: 1040px) {
  .compendium-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

#poster-canvas {
  display: none;
}

@media (min-width: 700px) {
  .app-shell {
    padding-right: 28px;
    padding-left: 28px;
  }

  .home-grid,
  .result-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  }

  .feature-card {
    order: 2;
  }

  .intro-panel {
    order: 1;
  }

  .result-card-slot {
    position: sticky;
    top: 88px;
  }

  .result-copy {
    order: -1;
  }

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

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

@media (min-width: 1040px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  }

  .result-layout {
    grid-template-columns: 400px minmax(0, 1fr);
    align-items: start;
  }

  .result-copy {
    order: 2;
  }

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

@media (max-width: 380px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .intro-panel,
  .result-copy,
  .rules-panel {
    padding: 16px;
  }

  .chip {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 12px;
  }

  .bottom-nav button {
    font-size: 12px;
  }
}

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

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

@keyframes shuffle {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.22);
    margin-left: 18px;
    margin-top: -8px;
  }
}

@keyframes fortune-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.is-loading {
  animation: fortune-pulse 1.2s ease-in-out infinite;
  color: var(--muted);
}

/* ── 牌册卡片网格 ── */
.compendium-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding-bottom: 32px;
}

.comp-card-thumb {
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(7, 29, 69, 0.72);
  transition: transform 160ms ease, border-color 160ms ease;
}

.comp-card-thumb:active {
  transform: scale(0.97);
}

.comp-card-thumb:hover {
  border-color: rgba(220, 179, 91, 0.5);
}

.comp-thumb-art {
  aspect-ratio: 2.5 / 3.6;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.comp-thumb-art .tarot-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  border-radius: 0;
  box-shadow: none;
}

.comp-thumb-art .tarot-card::before,
.comp-thumb-art .tarot-card::after {
  display: none;
}

.comp-thumb-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.comp-thumb-footer strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.comp-thumb-footer span {
  color: var(--muted);
  font-size: 11px;
}

/* ── 卡牌弹窗 ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(2, 8, 22, 0.72);
  backdrop-filter: blur(8px);
  padding: 0;
  animation: modal-fade-in 220ms ease both;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  position: relative;
  width: min(640px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
  background: #091e4a;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.5);
  animation: modal-slide-up 280ms cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

@keyframes modal-slide-up {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-close {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 12px 0 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--chalk);
  background: rgba(248, 244, 232, 0.14);
  font-size: 14px;
  z-index: 10;
}

.modal-layout {
  display: grid;
  gap: 0;
  padding: 0 0 32px;
}

.modal-card-slot {
  width: min(260px, 72vw);
  margin: 16px auto 0;
}

.modal-copy {
  padding: 20px 20px 8px;
}

/* ── 图片预览弹窗 ── */
.image-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(560px, 100%);
  padding: 20px 20px 28px;
  border-radius: 16px 16px 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
  background: #091e4a;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.5);
  animation: modal-slide-up 280ms cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.image-preview-tip {
  font-size: 13px;
  color: var(--gold);
  margin: 0;
  letter-spacing: 0.04em;
}

.image-preview-img {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  display: block;
  user-select: none;
}

.image-preview-close {
  min-height: 40px;
  padding: 0 28px;
  font-size: 14px;
}

/* ── 调试面板 ── */
.debug-panel {
  position: fixed;
  bottom: 90px;
  right: 10px;
  width: min(380px, calc(100vw - 20px));
  max-height: 300px;
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid var(--gold);
  border-radius: 8px;
  font-size: 11px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.debug-panel.collapsed .debug-log {
  display: none;
}

.debug-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(220, 179, 91, 0.15);
  border-bottom: 1px solid var(--gold);
  font-size: 11px;
}

.debug-header strong {
  flex: 1;
  color: var(--gold);
  font-size: 12px;
}

.debug-clear,
.debug-toggle {
  padding: 4px 8px;
  font-size: 10px;
  background: rgba(220, 179, 91, 0.2);
  border: 1px solid var(--gold);
  border-radius: 4px;
  color: var(--gold);
  cursor: pointer;
}

.debug-log {
  overflow-y: auto;
  padding: 8px;
  font-family: monospace;
  color: #fff;
  line-height: 1.5;
}

.debug-log-entry {
  margin-bottom: 4px;
  word-break: break-all;
}

.debug-log-entry.error {
  color: #ff6b6b;
}

.debug-log-entry.success {
  color: #51cf66;
}

.debug-log-entry.info {
  color: #74c0fc;
}

/* ── 集好运页面 ── */
.lucky-view .lucky-layout {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 0 40px;
}

.lucky-score-card {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 16px;
  padding: 24px 20px;
  margin: 20px 0;
  text-align: center;
}

.lucky-score-label {
  font-size: .85rem;
  color: var(--muted);
}

.lucky-score-num {
  font-size: 3rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.lucky-score-unit {
  font-size: 1rem;
  color: var(--gold);
}

.lucky-rules {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.lucky-rule-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .9rem;
  color: var(--muted);
}

.lucky-rule-item strong {
  color: var(--gold);
}

.rule-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* 木鱼舞台 */
.muyu-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 8px 0 20px;
}

.lucky-toast {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  font-size: .85rem;
  padding: 4px 14px;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  white-space: nowrap;
}

.lucky-toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

.muyu-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: radial-gradient(circle at 40% 35%, #b5651d, #7c3a0a);
  border: 3px solid #d4883a;
  border-radius: 50%;
  width: 140px;
  height: 140px;
  font-size: 3.2rem;
  color: var(--chalk);
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
  box-shadow: 0 6px 24px rgba(0,0,0,.4), 0 0 0 0 rgba(220,179,91,0);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.muyu-button .muyu-label {
  font-size: .75rem;
  letter-spacing: .05em;
}

.muyu-button:active,
.muyu-button.muyu-hit {
  transform: scale(.92);
  box-shadow: 0 2px 10px rgba(0,0,0,.4), 0 0 0 14px rgba(220,179,91,.25);
}

.muyu-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* 进度条 */
.lucky-tap-info {
  margin-bottom: 20px;
}

.lucky-tap-row {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.lucky-tap-row strong {
  color: var(--chalk);
}

.lucky-tap-bar-wrap {
  height: 6px;
  background: rgba(255,255,255,.12);
  border-radius: 3px;
  overflow: hidden;
}

.lucky-tap-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  border-radius: 3px;
  transition: width .3s ease;
  width: 0;
}

/* 首页功能入口 lucky 色调 */
.feature-entry--lucky {
  border-color: rgba(220,179,91,.4);
}

.feature-entry--lucky .feature-icon {
  color: var(--gold);
}

/* ── 球队选择 ── */
.lucky-team-section {
  margin-bottom: 20px;
}

.lucky-section-label {
  font-size: .82rem;
  color: var(--muted);
  margin: 0 0 12px;
  text-align: center;
}

.lucky-team-grid {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.lucky-team-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
  background: rgba(255,255,255,.06);
  border: 2px solid rgba(255,255,255,.14);
  border-radius: 14px;
  color: var(--chalk);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
  min-width: 96px;
  flex: 1;
  -webkit-tap-highlight-color: transparent;
}

.lucky-team-btn:active:not(:disabled) {
  transform: scale(.93);
}

.lucky-team-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.team-flag {
  font-size: 2rem;
  line-height: 1;
}

.team-name {
  font-size: .82rem;
  font-weight: 600;
}

.team-lucky-count {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.2;
}

.team-send-label {
  font-size: .72rem;
  color: var(--muted);
  background: rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 2px 8px;
  margin-top: 2px;
}

/* ── 保存海报（隐藏，截图专用）── */
#poster-container {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 540px;
  height: 720px;
  z-index: -1;
  pointer-events: none;
}

.poster-bg {
  width: 540px;
  height: 720px;
  background: linear-gradient(160deg, #0d2050 0%, #071830 45%, #020c1e 100%);
  display: flex;
  flex-direction: column;
  padding: 0 0 12px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  border: 2px solid rgba(220,179,91,.35);
}

.poster-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(126,199,223,.15), transparent 38%),
    radial-gradient(circle at 82% 82%, rgba(220,179,91,.12), transparent 38%);
  pointer-events: none;
}

/* 顶部装饰区 */
.poster-header-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 20px 10px;
  flex-shrink: 0;
}

.poster-header-stars {
  font-size: 17px;
  color: var(--gold);
  letter-spacing: 6px;
  margin-bottom: 4px;
  opacity: .7;
}

/* 顶部标题 */
.poster-main-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: .06em;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  line-height: 1.15;
}

.poster-main-title .poster-brand-tag {
  font-size: 15px;
  font-weight: 600;
  color: rgba(220,179,91,.8);
  background: rgba(220,179,91,.1);
  border: 1px solid rgba(220,179,91,.35);
  border-radius: 20px;
  padding: 2px 12px;
  letter-spacing: .1em;
  margin-top: 2px;
}

.poster-header-line {
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(220,179,91,.5), transparent);
  margin-top: 8px;
}

/* 左右主体 */
.poster-content {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 0;
  align-items: flex-start;
  padding: 10px 16px 0;
}

.poster-left {
  flex-shrink: 0;
  width: 230px;
  display: flex;
  flex-direction: column;
}

.poster-card-frame {
  height: 400px;
  border: 2px solid rgba(220,179,91,.55);
  border-radius: 12px;
  padding: 5px;
  background: rgba(220,179,91,.06);
  box-shadow: 0 0 12px rgba(220,179,91,.2), inset 0 0 8px rgba(0,0,0,.3);
  display: flex;
}

.poster-card-slot {
  flex: 1;
  display: flex;
  border-radius: 8px;
  overflow: hidden;
}

.poster-card-slot .tarot-card,
.poster-card-slot .card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* 右侧内容 */
.poster-right {
  width: 268px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.poster-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.poster-card-name {
  font-size: 28px;
  font-weight: 900;
  color: var(--chalk);
  letter-spacing: .03em;
}

.poster-rarity {
  font-size: 14px;
  padding: 2px 8px;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 20px;
  flex-shrink: 0;
}

.poster-keywords {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.poster-keywords span {
  font-size: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--chalk);
}

.poster-oracle-box {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 8px 10px 8px 12px;
  position: relative;
}

.poster-oracle-quote {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 22px;
  color: var(--gold);
  opacity: .6;
  line-height: 1;
}

.poster-oracle {
  margin: 0;
  font-size: 15px;
  font-style: italic;
  color: rgba(248,244,232,.85);
  line-height: 1.55;
  word-break: break-all;
  padding-left: 10px;
}

.poster-oracle-sep {
  text-align: center;
  color: var(--gold);
  font-size: 13px;
  opacity: .6;
  flex-shrink: 0;
  margin: 1px 0;
}

.poster-question {
  background: rgba(220,179,91,.1);
  border: 1px solid rgba(220,179,91,.3);
  border-radius: 7px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.poster-question-team {
  font-size: 13px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .03em;
}

.poster-question-team span {
  color: var(--chalk);
  font-weight: 400;
  margin-left: 4px;
}

.poster-question-text {
  font-size: 15px;
  color: var(--chalk);
  font-style: italic;
  line-height: 1.4;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 横条数值图 */
.poster-stats {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: auto;
  justify-content: flex-end;
}

.poster-stat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
  padding: 3px 7px 3px 4px;
}

.poster-stat-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(220,179,91,.15);
  border: 1px solid rgba(220,179,91,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  color: var(--gold);
}

.poster-stat-label {
  font-size: 13px;
  color: rgba(248,244,232,.8);
  font-weight: 600;
  width: 56px;
  flex-shrink: 0;
  white-space: nowrap;
}

.poster-stat-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,.1);
  border-radius: 3px;
  overflow: hidden;
}

.poster-stat-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #4db8d0, #dcb35b);
}

.poster-stat-num {
  font-size: 15px;
  font-weight: 800;
  color: var(--chalk);
  width: 22px;
  text-align: right;
  flex-shrink: 0;
}

/* 分隔行 */
.poster-divider {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .12em;
  text-align: center;
  flex-shrink: 0;
  margin: 8px 16px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.poster-divider::before,
.poster-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(220,179,91,.5), transparent);
}

/* 底部三栏运势 */
.poster-sections {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  flex-shrink: 0;
  margin: 0 12px;
  border: 1px solid rgba(220,179,91,.25);
  border-radius: 10px;
  overflow: hidden;
}

.poster-section-col {
  padding: 8px 8px 9px;
  background: rgba(7,29,69,.55);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
}

.poster-section-col:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(220,179,91,.22);
}

.poster-section-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(220,179,91,.12);
  border: 1px solid rgba(220,179,91,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--gold);
  flex-shrink: 0;
  margin-bottom: 1px;
}

.poster-section-arrow {
  font-size: 10px;
  color: var(--gold);
  opacity: .5;
  flex-shrink: 0;
}

.poster-section-label {
  font-size: 13px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .04em;
}

.poster-section-text {
  font-size: 13px;
  color: rgba(248,244,232,.82);
  line-height: 1.5;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ── 诚心求解 poster：竖向堆叠布局 ── */
.poster-bg.ask-mode .poster-content {
  flex-direction: column;
  align-items: center;
  padding: 4px 14px 0;
  gap: 8px;
  flex: unset;
}

.poster-bg.ask-mode .poster-left {
  width: 240px;
  flex-shrink: 0;
  flex: unset;
}

.poster-bg.ask-mode .poster-card-frame {
  height: 340px;
  width: 240px;
}

.poster-bg.ask-mode .poster-right {
  width: 100%;
  flex: unset;
  gap: 5px;
}

.poster-bg.ask-mode .poster-oracle-sep {
  display: none;
}

.poster-bg.ask-mode .poster-stats {
  display: none;
}

.poster-bg.ask-mode .poster-sections {
  margin: 0 10px;
}

.poster-bg.ask-mode .poster-divider {
  margin: 5px 14px 4px;
}


/* ═══ 诚心求解 poster 专属样式（pask-*）═══════════════════════════════ */
.pask-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
}

.pask-card-frame {
  width: 240px;
  height: 330px;
  border: 2px solid rgba(220,179,91,.55);
  border-radius: 12px;
  padding: 5px;
  background: rgba(220,179,91,.05);
  box-shadow: 0 0 14px rgba(220,179,91,.18), inset 0 0 10px rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pask-card-frame .card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.pask-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pask-card-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
}

.pask-rarity {
  font-size: 12px;
  color: rgba(248,244,232,.7);
  background: rgba(220,179,91,.15);
  border: 1px solid rgba(220,179,91,.3);
  border-radius: 4px;
  padding: 2px 8px;
}

.pask-question-box {
  margin: 0 14px;
  background: rgba(220,179,91,.08);
  border: 1px solid rgba(220,179,91,.4);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pask-question-quote {
  font-size: 20px;
  color: rgba(220,179,91,.6);
  line-height: 1;
}

.pask-question-text {
  font-size: 16px;
  color: var(--chalk);
  font-weight: 700;
  line-height: 1.45;
}

.pask-team-row {
  font-size: 13px;
  color: rgba(248,244,232,.65);
  margin-top: 2px;
}

.pask-team-row span {
  color: var(--gold);
  font-weight: 700;
}

.pask-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 14px;
}

.pask-keywords span {
  font-size: 13px;
  background: rgba(220,179,91,.12);
  border: 1px solid rgba(220,179,91,.25);
  border-radius: 12px;
  padding: 2px 10px;
  color: rgba(248,244,232,.85);
}

.pask-oracle {
  margin: 0 14px;
  font-size: 13px;
  color: rgba(248,244,232,.65);
  font-style: italic;
  line-height: 1.55;
}

.poster-bg.ask-mode .poster-divider {
  margin: 6px 14px 4px;
  font-size: 13px;
}

.poster-bg.ask-mode .poster-sections {
  margin: 0 10px;
}

/* ask模式：高度自适应，不裁剪内容 */
.poster-bg.ask-mode {
  height: auto !important;
  overflow: visible !important;
  min-height: 720px;
}

/* 懂球帝 logo - app 页面固定右上角 */
.app-dqd-logo {
  position: fixed;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  z-index: 200;
  pointer-events: none;
}

/* 懂球帝 logo - poster 右上角 */
.poster-logo {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
}

/* 木鱼图片替换 */
.muyu-icon-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.4));
}

.feature-icon-img--muyu {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.rule-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

/* 木鱼按钮居中重置 */
.muyu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  padding: 0;
  margin: 0 auto;
  background: radial-gradient(circle at 40% 35%, rgba(180,120,50,.3) 0%, rgba(80,45,10,.2) 100%);
  border: 2px solid rgba(220,179,91,.28);
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.muyu-icon-img {
  width: 155px !important;
  height: 155px !important;
  object-fit: contain;
  display: block;
  pointer-events: none;
  transition: transform 0.1s;
}

.muyu-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px 0;
  overflow: visible;
}

/* 点击抖动 */
@keyframes muyu-hit-anim {
  0%   { transform: scale(1) rotate(0deg); }
  25%  { transform: scale(0.86) rotate(-10deg); }
  65%  { transform: scale(1.1) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.muyu-button.muyu-hit {
  animation: muyu-hit-anim 0.35s cubic-bezier(.36,.07,.19,.97);
}

/* 浮字动效 */
@keyframes muyu-float-up {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  70%  { opacity: 0.9; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-65px) scale(1.5); }
}

.muyu-float-text {
  position: absolute;
  top: 30%;
  left: 50%;
  font-size: 26px;
  font-weight: 900;
  color: #dcb35b;
  text-shadow: 0 2px 6px rgba(0,0,0,.5);
  pointer-events: none;
  animation: muyu-float-up 0.75s ease-out forwards;
  z-index: 20;
  white-space: nowrap;
}

/* 集好运页返回按钮居中 */
.lucky-view .cta-row {
  display: flex;
  justify-content: center;
}


/* ════ 集好运 九宫格布局 ════════════════════════════════════════════════ */
.lucky-ninegrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(336px, 92vw);
  margin: 16px auto 12px;
}

/* 中心格：木鱼 */
.lucky-grid-center {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 16px;
  background: rgba(220,179,91,.08);
  border: 1px solid rgba(220,179,91,.2);
  overflow: visible;
}
.lucky-ninegrid .muyu-button {
  width: 100% !important;
  height: 100% !important;
  border-radius: 16px !important;
  border: none !important;
  background: none !important;
}
.lucky-ninegrid .muyu-icon-img {
  width: 80% !important;
  height: 80% !important;
}

/* 球队格 */
.lucky-grid-btn {
  aspect-ratio: 1;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(220,179,91,.28);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, transform .1s;
}
.lucky-grid-btn:active {
  background: rgba(220,179,91,.2);
  transform: scale(.92);
}
.lucky-grid-btn .team-flag  { font-size: 22px; line-height: 1.1; }
.lucky-grid-btn .team-name  { font-size: 11px; color: #e0c97a; font-weight: 700; line-height: 1; }
.lucky-grid-btn .team-lucky-count { font-size: 9px; color: rgba(255,255,255,.5); line-height: 1; }
.lucky-grid-btn .team-send-label  {
  font-size: 9px;
  color: rgba(220,179,91,.75);
  line-height: 1;
  margin-top: 1px;
}
