/* Shared gacha, pack and auction rules: neon card index, with the consent controls always in view. */
.sf-rules {
  --rules-cyan: #00ffff;
  --rules-pink: #ff006e;
  width: min(800px, calc(100% - 40px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  overflow: hidden;
  border: 1px solid #00ffff38;
  border-radius: 20px;
  background: #0a0014;
  box-shadow: 0 32px 100px #000b, 0 0 60px #00ffff09, inset 0 1px 0 #ffffff0d;
}
.sf-rules[open] { display: flex; flex-direction: column; animation: sf-rules-enter .24s ease-out; }
.sf-rules::backdrop { background: #05000cbb; backdrop-filter: blur(9px); }
.sf-rules-head {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 20px;
  padding: 30px 68px 26px 30px;
  background: radial-gradient(ellipse at 0 0, #00ffff15, transparent 65%), radial-gradient(ellipse at 100% 0, #ff006e18, transparent 65%);
}
.sf-rules-head::before { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0 3px, #00ffff06 3px 4px); mask-image: linear-gradient(#000, transparent); }
.sf-rules-head::after { content: ''; position: absolute; top: 0; left: 30px; width: 120px; height: 2px; background: var(--rules-cyan); box-shadow: 0 0 18px #00ffff88; }
.sf-rules-emblem { position: relative; flex: 0 0 64px; height: 72px; display: grid; place-items: center; border: 1px solid #00ffff55; border-radius: 12px; transform: rotate(-7deg); background: #00ffff0a; color: var(--rules-cyan); box-shadow: 0 0 25px #00ffff0d, 5px 5px 0 #ff006e16; }
.sf-rules-emblem::after { content: ''; position: absolute; inset: 5px; border: 1px solid #00ffff1a; border-radius: 7px; }
.sf-rules-emblem .icon { width: 34px; height: 34px; filter: drop-shadow(0 0 7px #00ffff55); }
.sf-rules-heading { min-width: 0; }
.sf-rules-mode { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 9px; color: var(--rules-cyan); font: 600 11px/1.5 var(--v2-mono); }
.sf-rules-mode::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.sf-rules-heading h2 { margin: 0; font: 700 25px/1.5 var(--v2-display); letter-spacing: -.4px; color: #f4f0ff; }
.sf-rules-heading p { margin: 7px 0 0; font-size: 12px; line-height: 1.7; color: #aaa0ba; }
.sf-rules-close { position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #ffffff18; border-radius: 50%; background: #ffffff04; color: #aaa0ba; transition: color .2s, background .2s; }
.sf-rules-close .icon { width: 17px; height: 17px; }
.sf-rules-close:hover { color: #fff; background: #ff006e22; }
.sf-rules-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 30px 24px; scrollbar-width: thin; scrollbar-color: #00ffff55 #0a0014; }
.sf-rules-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: sf-rule; }
.sf-rules-list > li { display: flex; gap: 12px; padding: 17px 16px; border: 1px solid #ffffff0f; border-radius: 12px; background: linear-gradient(125deg, #ffffff05, #ffffff02); counter-increment: sf-rule; }
.sf-rules-list > li::before { content: counter(sf-rule, decimal-leading-zero); flex: 0 0 24px; padding-top: 2px; color: #81768f; font: 700 13px/1.7 var(--v2-mono); }
.sf-rules-list > li > div { min-width: 0; }
.sf-rules-list > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sf-rules-list h3 { margin: 0 0 6px; color: #f4f0ff; font: 700 14px/1.6 var(--v2-display); }
.sf-rules-list p { margin: 0; color: #bdb3cd; font-size: 12.5px; line-height: 1.85; overflow-wrap: anywhere; }
.sf-rules-list .text-link { font-size: inherit; color: var(--rules-cyan); }
.sf-rules-list > .is-highlight { border-color: #00ffff29; background: linear-gradient(125deg, #00ffff0d, #00ffff03); }
.sf-rules-list > .is-highlight::before, .sf-rules-list > .is-highlight h3 { color: var(--rules-cyan); }
.sf-rules-list > .is-important { border-color: #ff006e2b; background: linear-gradient(125deg, #ff006e0d, #ff006e03); }
.sf-rules-list > .is-important::before, .sf-rules-list > .is-important h3 { color: #ff7aaf; }
.sf-rules-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px 30px; border-top: 1px solid #ffffff10; background: linear-gradient(110deg, #00ffff06, #ff006e04); }
.sf-rules-agree { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.sf-rules-agree input { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--rules-cyan); cursor: pointer; }
.sf-rules-agree b { display: block; color: #ded7eb; font-size: 12px; font-weight: 600; line-height: 1.7; }
.sf-rules-agree small { display: block; margin-top: 3px; color: #9c91af; font-size: 11px; line-height: 1.6; }
.sf-rules-agree:has(input:checked) b { color: var(--rules-cyan); }
.sf-rules-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.sf-rules-footer .button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 22px; border-radius: 9px; clip-path: none; font-size: 13px; text-align: center; }
.sf-rules-footer .button-outline { border-color: #ffffff26; color: #c0b5d0; background: transparent; }
.sf-rules-footer .button-primary { border: 1px solid var(--rules-cyan); color: #0a0014; background: var(--rules-cyan); box-shadow: 0 0 20px #00ffff18; }
.sf-rules-footer .button-primary:disabled { opacity: 1; border-color: #00ffff1f; color: #92859f; background: #ffffff08; box-shadow: none; cursor: not-allowed; }
.sf-rules-understood { margin-left: auto; min-width: 140px; }
.sf-rules :is(button, input, a):focus-visible { outline: 2px solid var(--rules-cyan); outline-offset: 4px; }
@keyframes sf-rules-enter { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 640px) {
  .sf-rules { width: calc(100% - 24px); max-height: calc(100dvh - 32px); border-radius: 16px; }
  .sf-rules-head { gap: 13px; padding: 24px 46px 22px 20px; }
  .sf-rules-head::after { left: 20px; width: 80px; }
  .sf-rules-emblem { flex-basis: 42px; height: 52px; border-radius: 8px; }
  .sf-rules-emblem .icon { width: 25px; height: 25px; }
  .sf-rules-heading h2 { font-size: 19px; letter-spacing: -.3px; }
  .sf-rules-heading p { font-size: 11px; margin-top: 5px; }
  .sf-rules-mode { font-size: 10px; margin-bottom: 6px; }
  .sf-rules-close { top: 12px; right: 12px; width: 30px; height: 30px; }
  .sf-rules-body { padding: 0 16px 18px; }
  .sf-rules-list { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .sf-rules-list > li { gap: 10px; padding: 14px; }
  .sf-rules-list p { font-size: 13px; }
  .sf-rules-footer { flex-wrap: wrap; gap: 16px; padding: 16px 20px max(18px, env(safe-area-inset-bottom)); }
  .sf-rules-agree { width: 100%; }
  .sf-rules-actions { width: 100%; }
  .sf-rules-actions .button { flex: 1; min-width: 0; padding-inline: 12px; }
  .sf-rules-understood { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .sf-rules[open] { animation: none; } }

