/* rn.css — генератор випадкових чисел: числа-«пігулки», кубики, монета, рядки кидків і список */
.rn__scroll { max-height: 300px; overflow: auto; margin-top: 14px; padding: 2px; }
.rn__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rn__chip { min-width: 44px; padding: 8px 12px; border: 1.5px solid #cfd9ee; border-radius: 12px; background: #eef2fb; color: #1f2f55; font-size: 16px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; word-break: break-all; }
.rn__chip--big { padding: 12px 22px; font-size: 32px; }
.rn__die { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 8px; border: 2px solid #283b69; border-radius: 10px; background: #fff; color: #1f2f55; font-size: 17px; font-weight: 900; }
.rn__coin { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font-size: 14px; font-weight: 900; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .38), 0 1px 3px rgba(31, 47, 85, .3); }
.rn__coin.is-h { background: radial-gradient(circle at 35% 28%, #fff6bf, #f5c431 45%, #a97800); color: #5a4300; border: 2px solid #8f6700; }
.rn__coin.is-t { background: radial-gradient(circle at 35% 28%, #ffffff, #c9d3ea 45%, #6f7ea6); color: #283b69; border: 2px solid #4a5a85; }
.rn__stage { position: relative; height: 330px; margin-top: 12px; perspective: 900px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 54px; box-sizing: border-box; overflow: hidden; border-radius: 18px; border: 1px solid rgba(80, 100, 150, .2); box-shadow: inset 0 0 44px rgba(80, 100, 150, .2), 0 6px 18px rgba(31, 47, 85, .14);
  background:
    linear-gradient(180deg, rgba(150, 165, 200, 0) 60%, rgba(150, 165, 200, .5) 100%),
    radial-gradient(ellipse 100% 80% at 50% 25%, #ffffff 0%, #e6ebf5 55%, #b9c3da 100%); }
.rn__shadow { position: absolute; left: 50%; bottom: 20px; width: 150px; height: 30px; margin-left: -75px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(40, 55, 95, .6) 0%, rgba(40, 55, 95, .3) 55%, rgba(40, 55, 95, 0) 72%); animation: rnShadow 1.5s cubic-bezier(.3, .1, .3, 1) both; }
.rn__toss { position: relative; width: 150px; height: 150px; transform-style: preserve-3d; animation: rnToss 1.5s cubic-bezier(.3, .1, .3, 1) both; }
.rn__coin3d { position: relative; width: 150px; height: 150px; transform-style: preserve-3d; transform: rotateX(var(--end)); animation: rnSpin 1.5s cubic-bezier(.12, .55, .25, 1) both; }
.rn__coin3d.is-h { --end: 1800deg; }
.rn__coin3d.is-t { --end: 1980deg; }
.rn__edge i, .rn__face { position: absolute; inset: 0; border-radius: 50%; }
.rn__edge i { background: repeating-conic-gradient(from 0deg, #c89a10 0 2.5deg, #8a6200 2.5deg 5deg); backface-visibility: visible; }
.rn__coin3d.is-t .rn__edge i { background: repeating-conic-gradient(from 0deg, #b9c4e0 0 2.5deg, #6f7ea6 2.5deg 5deg); }
.rn__face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rn__face--f { transform: translateZ(5.5px); }
.rn__face--b { transform: rotateX(180deg) translateZ(5.5px); }
.rn__svg { display: block; width: 100%; height: 100%; }
@keyframes rnToss { 0% { transform: translateY(0) scale(1); } 38% { transform: translateY(-112px) scale(1.18); } 70% { transform: translateY(0) scale(1); } 80% { transform: translateY(-18px) scale(1.02); } 90% { transform: translateY(0) scale(1); } 95% { transform: translateY(-4px); } 100% { transform: translateY(0) scale(1); } }
@keyframes rnSpin { from { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); } 40% { transform: rotateX(calc(var(--end) * .55)) rotateY(12deg) rotateZ(-5deg); } 70% { transform: rotateX(calc(var(--end) * .93)) rotateY(-6deg) rotateZ(3deg); } to { transform: rotateX(var(--end)) rotateY(0deg) rotateZ(0deg); } }
@keyframes rnShadow { 0% { transform: scale(1); opacity: 1; } 38% { transform: scale(.5); opacity: .35; } 70% { transform: scale(1); opacity: 1; } 80% { transform: scale(.88); opacity: .8; } 90% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rn__shadow, .rn__toss, .rn__coin3d { animation: none; } }
@media (max-width: 420px) { .rn__stage { height: 300px; padding-bottom: 46px; } }
.rn__rolls { display: grid; gap: 8px; margin-top: 12px; }
.rn__roll { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1.5px solid #cfd9ee; border-radius: 12px; background: #f6f8fd; }
.rn__rn { color: #5b6b8c; font-size: 12px; font-weight: 800; }
.rn__sum { margin-left: auto; color: #1f2f55; font-size: 18px; font-weight: 900; }
.rn__more { color: #5b6b8c; font-weight: 800; align-self: center; }
.rn__items { display: grid; gap: 8px; margin-top: 12px; }
.rn__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid #cfd9ee; border-radius: 12px; background: #f6f8fd; }
.rn__n { flex: 0 0 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #283b69; color: #fff; font-size: 13px; font-weight: 800; }
.rn__t { min-width: 0; color: #1f2f55; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.rn__center { display: flex; justify-content: center; margin-top: 14px; }
