/* Random tools: number generator, wheel, coin, dice */
.ccc .rnd [hidden] { display: none !important; }
.rnd { display: grid; gap: 20px; }
@media (min-width: 1000px) { .rnd { grid-template-columns: 1fr 1.2fr; align-items: start; } .rnd[data-mode="wheel"], .rnd[data-mode="coin"] { grid-template-columns: 1.2fr 1fr; } }
.rnd-err { color: var(--danger, #f87171); font-size: 13.5px; margin: 10px 0 0; }
.rnd-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.rnd-head .cc-panel__title { margin: 0; }
.rnd-small { background: none; border: 1px solid var(--c-line); color: var(--c-muted); border-radius: 8px; padding: 6px 12px; font: 600 12.5px var(--font, sans-serif); cursor: pointer; }
.rnd-small:hover { color: var(--text, #fff); }
.rnd-nums { display: flex; flex-wrap: wrap; gap: 8px; min-height: 56px; }
.rnd-nums span { min-width: 52px; padding: 10px 12px; text-align: center; border-radius: 10px; background: var(--surface-2, #1c212a); border: 1px solid var(--c-line); font: 800 20px var(--mono, monospace); color: var(--c-accent); }
.rnd-nums.is-one span { min-width: 0; width: 100%; font-size: 64px; padding: 18px 12px; }
.rnd-meta { color: var(--c-muted); font-size: 13px; margin: 12px 0 0; }
.rnd-hist { margin-top: 14px; }
.ccc .rnd-hist h3 { font-size: 13px; color: var(--c-muted); margin: 0 0 6px; font-weight: 600; }
.rnd-hist ol { margin: 0; padding-left: 18px; font: 12.5px/1.6 var(--mono, monospace); color: var(--c-muted); overflow-wrap: anywhere; }
.rnd-hist b { font-family: var(--font, sans-serif); color: var(--text, #e7eaf0); margin-right: 4px; }
/* wheel */
.rnd-wheel { position: relative; width: 100%; max-width: 460px; margin: 0 auto; aspect-ratio: 1; }
.rnd-wheel canvas { width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: 0 0 0 6px var(--surface-2, #1c212a), 0 0 0 7px var(--c-line); cursor: pointer; }
.rnd-pointer { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 28px solid #f4f5f7; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }
.rnd-hub { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 22%; aspect-ratio: 1; border-radius: 50%; border: 4px solid #0e1014; background: #f4f5f7; color: #10140a; font: 800 15px var(--font, sans-serif); cursor: pointer; }
.rnd-win { text-align: center; font-size: 15px; color: var(--c-muted); margin: 16px 0 0; min-height: 28px; }
.rnd-win b { font-size: 24px; color: var(--c-accent); overflow-wrap: anywhere; }
.rnd-lbl { display: block; font-size: 13px; color: var(--c-muted); margin: 0 0 6px; }
.ccc .rnd textarea { width: 100%; box-sizing: border-box; background: var(--bg, #0e1014); border: 1px solid var(--c-line); color: var(--text, #e8eaee); border-radius: 8px; padding: 10px 12px; font: 500 14px/1.5 var(--font, sans-serif); resize: vertical; }
.rnd-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
/* coin */
.rnd-coinwrap { perspective: 800px; display: grid; place-items: center; padding: 10px 0; }
.rnd-coin { position: relative; width: 160px; height: 160px; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.3, .8, .3, 1); cursor: pointer; }
.rnd-face { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; backface-visibility: hidden; font: 800 22px var(--font, sans-serif); color: #3b2f05; background: radial-gradient(circle at 35% 30%, #fff7cc 0 12%, #facc15 45%, #a16207 100%); box-shadow: inset 0 0 0 8px rgba(0, 0, 0, .12); }
.rnd-t { transform: rotateY(180deg); background: radial-gradient(circle at 35% 30%, #f1f5f9 0 12%, #cbd5e1 45%, #64748b 100%); color: #1e293b; }
.rnd-center { justify-content: center; flex-wrap: wrap; gap: 10px; }
.rnd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rnd-stats div { background: var(--surface-2, #1c212a); border: 1px solid var(--c-line); border-radius: 10px; padding: 8px 10px; }
.rnd-stats span { display: block; font-size: 12px; color: var(--c-muted); }
.rnd-stats b { font: 700 16px var(--mono, monospace); }
.rnd-stats small { display: block; font-size: 11.5px; color: var(--c-muted); font-weight: 600; }
.rnd-strip { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 4px; }
.rnd-strip i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 800 11px var(--mono, monospace); font-style: normal; }
.rnd-strip .is-h { background: #facc15; color: #3b2f05; } .rnd-strip .is-t { background: #94a3b8; color: #0f172a; }
/* dice */
.rnd-dice { display: flex; flex-wrap: wrap; gap: 10px; min-height: 64px; }
.rnd-die { width: 60px; height: 60px; border-radius: 12px; background: #f4f5f7; color: #111317; display: grid; place-items: center; font: 800 22px var(--mono, monospace); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); }
.rnd-die.is-d6 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 8px; box-sizing: border-box; }
.rnd-die.is-d6 i { width: 10px; height: 10px; border-radius: 50%; place-self: center; }
.rnd-die.is-d6 i.on { background: #111317; }
.rnd-dice.is-roll .rnd-die { animation: rnd-roll .45s ease-out; }
@keyframes rnd-roll { 0% { transform: rotate(-90deg) scale(.6); opacity: .2; } 100% { transform: none; opacity: 1; } }
.rnd-total { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.rnd-total span { color: var(--c-muted); font-size: 13px; }
.rnd-total b { font: 800 44px/1 var(--mono, monospace); color: var(--c-accent); }
@media (max-width: 480px) { .rnd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rnd-die { width: 50px; height: 50px; } .rnd-coin { width: 130px; height: 130px; } }
@media (prefers-reduced-motion: reduce) { .rnd-coin, .rnd-wheel canvas { transition-duration: .01s !important; } .rnd-dice.is-roll .rnd-die { animation: none; } }
/* 2.0.0: sweepstake, cards, raffle, two-up */
.rnd-gap { margin-top: 14px; }
.ccc .rnd-tools input[type="number"] { width: 72px; background: var(--bg, #0e1014); border: 1px solid var(--c-line); color: var(--text, #e8eaee); font: 700 14px var(--mono, monospace); padding: 6px 8px; border-radius: 6px; }
.rnd-tools { align-items: center; }
.ccc .rnd .cc-field:has(input[type="text"]) { flex-wrap: wrap; }
.ccc .rnd .cc-field input[type="text"] { flex-basis: 100%; width: 100%; max-width: none; text-align: left; }
.ccc .rnd-tbl { width: 100%; border-collapse: collapse; margin: 0; font-size: 14px; }
.ccc .rnd-tbl th, .ccc .rnd-tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--c-line); background: none; vertical-align: top; }
.ccc .rnd-tbl th { width: 34%; color: var(--text, #e7eaf0); }
.ccc .rnd-tbl td { color: var(--c-accent); font-weight: 600; }
.rnd-cards { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 130px; padding: 8px 0; }
.rnd-card { width: 86px; height: 122px; border-radius: 10px; background: #f8fafc; color: #111317; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .7); }
.rnd-card b { font: 800 34px/1 var(--font, sans-serif); } .rnd-card i { font-style: normal; font-size: 30px; line-height: 1.1; }
.rnd-card.is-red { color: #d62839; } .rnd-card.is-jk { color: #7c3aed; } .rnd-card.is-jk i { font-size: 13px; font-weight: 700; }
.rnd-cards.is-roll .rnd-card { animation: rnd-roll .4s ease-out; }
.ccc .rnd-h3 { font-size: 15px; margin: 22px 0 10px; }
.rnd-prizes span { display: flex; flex-direction: column; align-items: center; gap: 2px; } .rnd-prizes small { font: 600 11px var(--font, sans-serif); color: var(--c-muted); }
.rnd-tickets { display: grid; gap: 10px; }
.rnd-tickets .rt { display: flex; background: #f8fafc; color: #111317; border-radius: 6px; border: 1px dashed #64748b; min-height: 120px; }
.rnd-tickets .rt-stub { width: 34%; border-right: 1px dashed #64748b; padding: 10px; display: flex; flex-direction: column; gap: 10px; font-size: 11px; }
.rnd-tickets .rt-stub span { border-bottom: 1px solid #94a3b8; padding-top: 8px; color: #475569; }
.rnd-tickets .rt-main { flex: 1; padding: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; text-align: center; }
.rnd-tickets .rt-n { font: 800 28px var(--mono, monospace); } .rnd-tickets .rt-main strong { font-size: 15px; } .rnd-tickets .rt-main span { font-size: 12px; color: #475569; }
.rnd-twoup { display: flex; justify-content: center; gap: 24px; perspective: 800px; padding: 10px 0; }
.rnd-twoup .rnd-coin { width: 120px; height: 120px; }
.rnd-strip .is-o { background: #334155; color: #e2e8f0; }
@media (max-width: 480px) { .rnd-card { width: 64px; height: 92px; } .rnd-card b { font-size: 26px; } .rnd-twoup .rnd-coin { width: 100px; height: 100px; } }
/* 2.1.0: name picker, lucky numbers, football squares */
.rnd-picked { min-height: 80px; }
.rnd-picked ol { margin: 0; padding-left: 26px; font: 700 18px/1.7 var(--font, sans-serif); }
.rnd-picked.is-one ol { list-style: none; padding: 0; text-align: center; font-size: clamp(30px, 8vw, 52px); color: var(--c-accent); overflow-wrap: anywhere; }
.rnd-picked.is-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rnd-picked.is-teams div { background: var(--surface-2, #1c212a); border: 1px solid var(--c-line); border-radius: 10px; padding: 10px 12px; }
.ccc .rnd-picked h3 { margin: 0 0 4px; font-size: 14px; color: var(--c-accent); }
.rnd-picked ul { margin: 0; padding-left: 18px; font-size: 14.5px; line-height: 1.6; }
.ccc .rnd .cc-field input[type="date"] { width: auto; max-width: 100%; background: var(--bg, #0e1014); border: 1px solid var(--c-line); color: var(--text, #e8eaee); border-radius: 6px; padding: 7px 8px; font: 700 14px var(--mono, monospace); }
.rnd-scroll { overflow-x: auto; }
.ccc .rnd-sq { width: 100%; min-width: 520px; border-collapse: collapse; table-layout: fixed; margin: 0; font-size: 12px; }
.ccc .rnd-sq th, .ccc .rnd-sq td { border: 1px solid var(--c-line); padding: 6px 2px; text-align: center; background: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccc .rnd-sq th { font: 800 15px var(--mono, monospace); color: var(--c-accent); background: var(--surface-2, #1c212a); }
.ccc .rnd-sq th.rnd-sqc { font: 600 10.5px/1.25 var(--font, sans-serif); color: var(--c-muted); width: 74px; white-space: normal; }
.ccc .rnd-sq td.is-free { color: var(--c-muted); }
.ccc .rnd-sq td.is-hit { background: var(--c-accent); color: #10140a; font-weight: 800; }
.rnd-check { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--c-muted); }
.ccc .rnd-check input { width: 64px; background: var(--bg, #0e1014); border: 1px solid var(--c-line); color: var(--text, #e8eaee); border-radius: 6px; padding: 6px; font: 700 15px var(--mono, monospace); text-align: center; }
.rnd-check b { color: var(--text, #e8eaee); }
.rnd > * { min-width: 0; }
.rnd .rnd-stats { margin-top: 12px; }
