/* 评审第 1 轮修改（组 b）的样式 */

/* ---------- 红鸾牌背（P1-4）：红鸾宫专属纹样，用在扇子、牌位、翻牌、图鉴 ---------- */
.pal-hl .cback, .hlf-ghost, .al-back {
  background: url(../art/hongluan-cards/back.webp) center / cover no-repeat, #5A0E1E;
  border: 1px solid rgba(255, 214, 160, .55); border-radius: 7px;
  box-shadow: 0 6px 16px rgba(20, 0, 8, .55), inset 0 0 0 2px rgba(58, 15, 28, .55);
}

/* ---------- 选牌页：扇形牌阵 ---------- */
.hl-fan-page { position: relative; isolation: isolate; min-height: calc(100svh - 48px); overflow: hidden; display: flex; flex-direction: column; }
.hlf-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url(../art/hongluan-god.webp) center 18% / cover no-repeat; opacity: .26;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.9) 45%, transparent 92%); mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.9) 45%, transparent 92%);
  animation: hlfBg 1.6s ease both; }
@keyframes hlfBg { from { opacity: 0; transform: scale(1.06); } }
.hlf-slots { display: flex; justify-content: center; gap: 10px; padding-top: 18px; }
.hlf-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 104px; }
.hlf-slot > span { font-size: 12px; line-height: 1.35; color: var(--dim); text-align: center; min-height: 2.7em; }
.hlf-hole { position: relative; width: 64px; aspect-ratio: 9 / 16; border-radius: 7px; border: 1px dashed rgba(255, 190, 205, .5);
  background: rgba(40, 6, 16, .45); display: grid; place-items: center; box-shadow: inset 0 0 18px rgba(255, 100, 140, .15); }
.hlf-hole i { font: 700 15px var(--serif); font-style: normal; color: rgba(255, 200, 215, .55); }
.hlf-slot.filled .hlf-hole { border-style: solid; border-color: rgba(255, 214, 160, .7);
  background: url(../art/hongluan-cards/back.webp) center / cover no-repeat, #5A0E1E; box-shadow: 0 0 18px rgba(255, 120, 160, .55); animation: hlfLand .5s ease; }
.hlf-slot.filled .hlf-hole i { opacity: 0; }
@keyframes hlfLand { 40% { transform: scale(1.08); box-shadow: 0 0 30px rgba(255, 190, 150, .9); } }
.hl-fan-page .draw-hint { margin: 16px 0 0; min-height: 1.5em; }
.hlf-fan { position: relative; height: 270px; margin: auto -16px 0; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hlf-card { position: absolute; left: 50%; top: 50px; width: 86px; margin-left: -43px; aspect-ratio: 9 / 16; padding: 0; cursor: pointer;
  transform-origin: 50% 600px; transform: rotate(calc(var(--i) * 6.2deg + var(--off, 0deg)));
  transition: transform .7s cubic-bezier(.3, .75, .3, 1), opacity .25s; -webkit-tap-highlight-color: transparent; }
.hlf-fan.live .hlf-card { transition: transform .09s linear, opacity .25s; }
.hlf-fan.gather .hlf-card { transform: rotate(calc(var(--i) * .25deg)) translateY(calc(var(--i) * -.5px)); }
.hlf-fan.gather.cut .hlf-card:nth-child(odd) { transform: translateX(-52px) rotate(-6deg); transition-duration: .26s; }
.hlf-fan.gather.cut .hlf-card:nth-child(even) { transform: translateX(52px) rotate(6deg); transition-duration: .26s; }
.hlf-card:focus-visible { outline: 2px solid var(--gold2); }
@media (hover: hover) { .hlf-fan.live .hlf-card:hover { filter: brightness(1.15) drop-shadow(0 0 10px #ff8fa8); } }
.hlf-card.gone { opacity: 0; pointer-events: none; }
.hlf-ghost { position: fixed; z-index: 60; pointer-events: none; margin: 0; box-shadow: 0 0 26px rgba(255, 130, 170, .9); }
.hl-fan-page .draw-count { margin: 4px 0 10px; }

/* 红鸾的牌（牌面插画和牌背都是 9:16） */
.pal-hl .flip { aspect-ratio: 9 / 16; }

/* ---------- 牌面（P1-5）：整张插画 + 牌名；逆位画倒过来，字不倒 ---------- */
.cface.hlc { padding: 0; overflow: hidden; background: #2A0A14; border: 1px solid rgba(255, 214, 160, .75); border-radius: 7px;
  box-shadow: inset 0 0 0 3px rgba(42, 10, 20, .35), 0 6px 18px rgba(20, 0, 8, .5); }
.hlc-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cface.hlc.rev .hlc-art { transform: rotate(180deg); }
.cface.hlc::after { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(255, 225, 180, .55); border-radius: 4px; pointer-events: none; }
.hlc-no { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 1; padding: 1px 7px; border-radius: 9px;
  font: 700 10px/1.5 var(--serif); letter-spacing: 1px; color: #FFE7C2; background: rgba(60, 8, 22, .62); }
.hlc-name { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 18px 4px 8px; text-align: center;
  font: 900 clamp(13px, 3.9vw, 17px)/1.2 var(--serif); letter-spacing: 2px; color: #FFF1E0; text-shadow: 0 1px 4px rgba(40, 0, 10, .9);
  background: linear-gradient(180deg, transparent, rgba(58, 8, 22, .82) 55%); white-space: nowrap; }
.hlc-rev { position: absolute; top: 6px; right: 6px; z-index: 2; width: 20px; height: 20px; display: grid; place-items: center;
  font: 900 12px/1 var(--serif); font-style: normal; color: #FF5D78; border: 1.5px solid #FF5D78; border-radius: 3px; background: rgba(42, 6, 16, .7); }

/* ---------- 正位 / 逆位不断行（P2-13） ---------- */
.hl-orient { white-space: nowrap; }
.hl-orient.rev { color: #FF8FA3; }

/* ---------- 红鸾先回一句用户原话（P1-14） ---------- */
.hl-echo { margin-bottom: 8px; }

/* ---------- 图鉴：牌背 / 缩略图（P1-5） ---------- */
.al-grid.al-cards { gap: 8px; }
.al-card { position: relative; min-width: 0; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; }
.al-card img, .al-card .al-back { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 6px; }
.al-card .al-back { filter: grayscale(.55) brightness(.5); box-shadow: none; }
.al-card b { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 2px 4px; text-align: center; font: 800 11px/1.2 var(--serif);
  color: #FFF1E0; background: linear-gradient(180deg, transparent, rgba(40, 6, 16, .85)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-card:not(.on) b { background: none; top: 0; display: grid; place-items: center; font-size: 18px; color: rgba(255, 214, 160, .55); padding: 0; }
.al-card.on { box-shadow: 0 0 0 1px rgba(255, 214, 160, .7); }
.al-grid.al-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
