/* =====================================================================
   夜局 · 玩法说明弹层（js/rules.js 的 showRules）
   底部弹出的酒红丝绒卡，金色细线；z-index 62 高于 app / 联机弹层（60），低于隐私锁
   ===================================================================== */
html.rl-lock, html.rl-lock body { overflow: hidden; }

.rl-ov { position: fixed; inset: 0; z-index: 62; display: flex; align-items: flex-end; justify-content: center;
  animation: rlFade .22s ease both; }
.rl-ov.out { animation: rlOut .2s ease both; pointer-events: none; }
.rl-scrim { position: absolute; inset: 0; background: #050203a6; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

.rl-sheet { position: relative; width: 100%; max-width: 480px; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0; border: 1px solid #d9b26f33; border-bottom: 0;
  background: radial-gradient(120% 55% at 50% 0%, #4a142659, transparent 62%), linear-gradient(180deg, var(--card2), #120810);
  box-shadow: 0 -30px 60px -20px #000, inset 0 1px 0 #ffffff12; color: var(--text);
  animation: rlUp .42s var(--ease) both; }
.rl-ov.out .rl-sheet { animation: rlDown .2s ease both; }
.rl-grab { display: block; width: 40px; height: 4px; border-radius: 4px; background: #ffffff1f; margin: 0 auto 14px; }

.rl-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; padding: 0; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: #ffffff08; color: var(--mute); font-size: 15px; line-height: 1; cursor: pointer; }
.rl-x:hover, .rl-x:focus-visible { color: var(--gold2); border-color: var(--line2); outline: none; box-shadow: 0 0 0 3px #d9b26f2e; }

.rl-eyebrow { font: italic 500 13px/1 var(--latin); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); opacity: .85; padding-right: 48px; }
.rl-sheet h3 { margin: 8px 48px 14px 0; font: 700 25px/1.25 var(--serif); letter-spacing: .04em;
  background: var(--goldg); -webkit-background-clip: text; background-clip: text; color: transparent; }

.rl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.rl-chips span { display: inline-flex; align-items: baseline; gap: 7px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line2); background: #d9b26f0d; font-size: 13.5px; color: var(--text); }
.rl-chips small { font-size: 11px; letter-spacing: .12em; color: var(--gold); opacity: .9; }

.rl-goal { position: relative; padding: 14px 16px 14px 18px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(135deg, #d93a5e14, transparent 70%), var(--card); margin-bottom: 4px; }
.rl-goal::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent); }
.rl-goal small { display: block; font-size: 11px; letter-spacing: .14em; color: var(--accent); margin-bottom: 4px; }
.rl-goal p { margin: 0; font: 600 16.5px/1.6 var(--serif); color: #fbefe2; }

.rl-h { margin: 18px 0 8px; font: 600 13px/1 var(--serif); letter-spacing: .16em; color: var(--gold); display: flex; align-items: center; gap: 10px; }
.rl-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); }

.rl-sheet ol { list-style: none; margin: 0; padding: 0; counter-reset: rl; display: grid; gap: 9px; }
.rl-sheet ol li { counter-increment: rl; position: relative; padding: 1px 0 0 36px; font-size: 15px; line-height: 1.6; color: var(--text); }
.rl-sheet ol li::before { content: counter(rl); position: absolute; left: 0; top: 0; width: 25px; height: 25px; border-radius: 50%;
  display: grid; place-items: center; font: 600 14px/1 var(--latin); color: var(--bg); background: var(--goldg); box-shadow: 0 0 12px -3px #d9b26f88; }

.rl-sheet ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rl-sheet ul li { position: relative; padding-left: 20px; font-size: 14px; line-height: 1.55; color: var(--mute); }
.rl-sheet ul li::before { content: "✦"; position: absolute; left: 2px; top: 1px; font-size: 10px; color: var(--gold); }

.rl-fb { margin: 12px 0 0; font-size: 14px; color: var(--mute); }

.rl-safe { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0 0; padding: 12px 14px; border-radius: 14px;
  border: 1px solid #d93a5e40; background: #4a0f2238; font-size: 13px; line-height: 1.55; color: var(--mute); }
.rl-safe span { color: var(--accent); font-size: 10px; line-height: 20px; flex: none; }

@media (max-width: 360px) {
  .rl-sheet { padding-left: 16px; padding-right: 16px; }
  .rl-sheet h3 { font-size: 22px; }
  .rl-sheet ol li { font-size: 14.5px; }
}

@keyframes rlFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rlUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes rlOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes rlDown { from { transform: none; } to { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  .rl-ov, .rl-ov.out, .rl-sheet, .rl-ov.out .rl-sheet { animation: none; }
}
