/* Справочник чисел и арканов */
.lib-switch { display: inline-flex; gap: 4px; margin-top: 16px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.lib-switch a { padding: 7px 16px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.lib-switch a.on { background: var(--gold); color: #1b1630; font-weight: 600; }
.lib-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.lib-tile { display: grid; gap: 4px; color: var(--text); text-decoration: none; transition: transform .25s, border-color .25s, box-shadow .25s; }
.lib-tile:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 14px 36px rgba(0,0,0,.35); }
.lib-tile b { font: 700 1.35rem "Cormorant Garamond", serif; color: var(--gold2); }
.lib-tile small { color: var(--muted); font-size: .84rem; }
.lib-n { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font: 700 1.7rem "Cormorant Garamond", serif;
  color: #1b1630; background: radial-gradient(circle at 30% 30%, var(--gold2), var(--gold)); transition: transform .4s var(--ease); }
.lib-tile:hover .lib-n { transform: rotate(-10deg) scale(1.08); }
.lib-tile.master .lib-n { background: radial-gradient(circle at 30% 30%, #d9cdff, var(--accent)); }
.lib-share { position: relative; display: block; margin-top: 6px; padding-top: 8px; font-size: .76rem; color: var(--muted); }
.lib-share::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); }
.lib-share i { position: absolute; top: 0; left: 0; height: 4px; width: var(--w); border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--gold2)); }
.lib-note { text-align: center; margin-top: 18px; }
.lib-page { max-width: 900px; margin: 0 auto; }
.lib-page .card { margin-bottom: 14px; }
.lib-head { display: flex; gap: 22px; align-items: center; margin: 6px 0 18px; }
.lib-head h1 { margin: 0; font-size: clamp(1.9rem, 4.5vw, 2.8rem); color: var(--gold2); }
.lib-head .lead { margin: .3rem 0; }
.lib-orb { flex: none; width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; color: #1b1630;
  background: radial-gradient(circle at 32% 30%, var(--gold2), var(--gold) 60%, #9a7535); box-shadow: 0 0 40px rgba(241,217,161,.45);
  animation: libOrb 5s ease-in-out infinite; }
.lib-orb span { font: 700 3.4rem "Cormorant Garamond", serif; }
.lib-orb.master { background: radial-gradient(circle at 30% 30%, #e6dcff, var(--accent) 65%, #5b45ad); box-shadow: 0 0 40px rgba(143,123,216,.6); }
.lib-orb.arc { border-radius: 22px; transform: rotate(45deg); animation: libArc 6s ease-in-out infinite; }
.lib-orb.arc span { transform: rotate(-45deg); }
@keyframes libOrb { 50% { transform: translateY(-4px); box-shadow: 0 0 70px rgba(241,217,161,.7); } }
@keyframes libArc { 50% { transform: rotate(45deg) translateY(-4px); box-shadow: 0 0 60px rgba(241,217,161,.6); } }
.lib-stat { margin: .2rem 0 0; }
.lib-stat b { color: var(--gold2); font-size: 1.15rem; }
.lib-pm { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.lib-pm h3 { font-size: 1.1rem; margin: .4rem 0 0; }
.lib-pm div:first-child h3 { color: var(--ok); } .lib-pm div:last-child h3 { color: var(--warn); }
.lib-cols { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 14px; }
.lib-cols .card { margin: 0; }
.lib-compat { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.lib-compat a { position: relative; display: grid; gap: 2px; padding: 10px 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  color: var(--text); text-decoration: none; overflow: hidden; transition: .2s; }
.lib-compat a:hover { border-color: var(--gold); }
.lib-compat b { font: 700 1.25rem "Cormorant Garamond", serif; color: var(--gold2); }
.lib-compat span { font-size: .8rem; color: var(--muted); }
.lib-compat i { position: absolute; left: 0; bottom: 0; height: 4px; width: var(--w); background: linear-gradient(90deg, var(--accent), var(--gold2)); }
.lib-compat .lc-natural, .lib-compat .lc-mirror { border-color: rgba(212,175,106,.5); }
.lib-ex { padding-left: 1.1em; }
.lib-ex code { font-size: .8rem; color: var(--muted); }
.lib-page a:not(.btn) { color: var(--gold2); }
.lib-points { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 8px 0; }
.lib-points div { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.lib-points small { grid-column: 2; color: var(--muted); font-size: .8rem; }
.lib-points .r-k { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold2); font-size: .72rem; grid-row: span 2; }
.tbl { border-collapse: collapse; width: 100%; font-size: .92rem; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.tbl th { color: var(--gold2); background: rgba(212,175,106,.1); }
@media (max-width: 640px) { .lib-head { flex-direction: column; text-align: center; } .lib-pm { grid-template-columns: 1fr; } .lib-orb { width: 90px; height: 90px; } }
@media (prefers-reduced-motion: reduce) { .lib-orb { animation: none; } }

/* отзывы */
.rv-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; margin-bottom: 18px; }
.rv header { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.rv header small { display: block; color: var(--muted); font-size: .8rem; }
.rv-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 1.5rem "Cormorant Garamond", serif;
  color: #1b1630; background: radial-gradient(circle at 30% 30%, var(--gold2), var(--gold)); text-decoration: none; }
.rv-num.none { background: rgba(212,175,106,.2); color: var(--gold2); }
.rv p { margin: .7rem 0 .5rem; white-space: pre-line; }
.rv-buyer { color: var(--ok); }
.rv-answer { margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--accent); background: rgba(143,123,216,.1); border-radius: 0 10px 10px 0; font-size: .92rem; }
.rv-stars { display: inline-block; font-size: 1rem; letter-spacing: 2px; line-height: 1; color: rgba(255,255,255,.18); white-space: nowrap; }
.rv-stars b { color: var(--gold2); font-weight: 400; }
.rv-stars.big { font-size: 1.5rem; vertical-align: -2px; }
.rv-form-card { max-width: 760px; margin: 0 auto; }
.rv-form { display: grid; gap: 10px; }
.rv-row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.rv-row label { display: grid; gap: 4px; font-size: .9rem; }
.rv-rate { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rv-rate input { position: absolute; opacity: 0; pointer-events: none; }
.rv-rate label { font-size: 2rem; color: rgba(255,255,255,.2); cursor: pointer; transition: color .15s, transform .15s; }
.rv-rate label:hover, .rv-rate label:hover ~ label, .rv-rate input:checked ~ label { color: var(--gold2); }
.rv-rate label:hover { transform: scale(1.15); }
.rv-actions { display: flex; gap: 14px; align-items: center; }
.rv-form-card a { color: var(--gold2); }
@media (max-width: 640px) { .rv-row { grid-template-columns: 1fr; } }
.lib-page .prose h2:first-child { margin-top: 0; }
