/* Coin Flip & Dice Roller — SaveHD */
.cfd-app{max-width:640px;margin:0 auto;font-size:16px;line-height:1.55;color:#1f2937}
.cfd-tabs{display:flex;gap:8px;margin-bottom:16px}
.cfd-tab{flex:1;border:2px solid #e5e7eb;background:#fff;border-radius:12px;padding:12px;font-size:16px;font-weight:700;cursor:pointer;font-family:inherit;color:#6b7280;transition:all .15s ease}
.cfd-tab.active{border-color:#d97706;background:#fffbeb;color:#92400e;box-shadow:0 4px 12px rgba(217,119,6,.15)}
.cfd-panel{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:28px 22px;box-shadow:0 2px 10px rgba(15,23,42,.05);text-align:center}
.cfd-panel.hidden{display:none}
.cfd-coin-wrap{perspective:900px;display:flex;justify-content:center;margin:6px 0 18px;min-height:170px;align-items:center}
.cfd-coin{width:150px;height:150px;position:relative;transform-style:preserve-3d;transition:transform 2.1s cubic-bezier(.25,.7,.3,1);cursor:pointer}
.cfd-face{position:absolute;inset:0;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:radial-gradient(circle at 35% 30%,#fde68a,#f59e0b 55%,#b45309);border:6px solid #d97706;box-shadow:0 10px 24px rgba(180,83,9,.4),inset 0 2px 6px rgba(255,255,255,.5);color:#78350f}
.cfd-face span{font-size:64px;font-weight:900;line-height:1}
.cfd-face small{font-size:13px;font-weight:800;letter-spacing:3px}
.cfd-back{transform:rotateY(180deg)}
.cfd-result{font-size:18px;color:#6b7280;margin:6px 0 4px;min-height:30px}
.cfd-result strong{color:#92400e;font-size:30px}
.cfd-result .cfd-win{color:#92400e;font-weight:800;font-size:26px;animation:cfd-pop .35s ease}
@keyframes cfd-pop{from{transform:scale(.7);opacity:0}to{transform:scale(1);opacity:1}}
.cfd-btn{border:none;border-radius:12px;padding:12px 26px;font-size:16px;font-weight:800;cursor:pointer;font-family:inherit;transition:transform .08s ease,box-shadow .12s ease}
.cfd-btn:active{transform:scale(.97)}
.cfd-btn:disabled{opacity:.55;cursor:not-allowed;transform:none}
.cfd-btn-big{background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff;font-size:19px;padding:14px 40px;margin:10px 0 4px;box-shadow:0 8px 22px rgba(217,119,6,.4)}
.cfd-btn-big:hover{box-shadow:0 10px 28px rgba(217,119,6,.55)}
.cfd-btn-ghost{background:#f3f4f6;color:#374151;font-size:14px;padding:8px 16px}
.cfd-btn-ghost:hover{background:#e5e7eb}
.cfd-stats{display:flex;justify-content:center;gap:10px;margin:18px 0 6px;flex-wrap:wrap}
.cfd-stat{background:#fffbeb;border:1px solid #fde68a;border-radius:12px;padding:10px 18px;min-width:76px}
.cfd-stat strong{display:block;font-size:22px;color:#92400e}
.cfd-stat span{font-size:12px;color:#a16207;text-transform:uppercase;letter-spacing:1px}
.cfd-row{display:flex;gap:12px;align-items:center;justify-content:center;margin-top:12px;flex-wrap:wrap}
.cfd-check{display:inline-flex;align-items:center;gap:6px;font-size:14px;cursor:pointer;user-select:none}
.cfd-check input{width:16px;height:16px;accent-color:#d97706}
.cfd-history{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:14px;min-height:32px}
.cfd-hchip{background:#f3f4f6;border-radius:8px;padding:4px 10px;font-size:13px;font-weight:700;color:#4b5563}
.cfd-hchip.h{background:#fef3c7;color:#92400e}
.cfd-hchip.t{background:#e0e7ff;color:#3730a3}
.cfd-dice-controls{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:18px;flex-wrap:wrap}
.cfd-label{font-weight:700;color:#6b7280}
.cfd-dice-count{display:flex;gap:6px}
.cfd-dice-count button{width:40px;height:40px;border-radius:10px;border:2px solid #e5e7eb;background:#fff;font-size:16px;font-weight:800;cursor:pointer;font-family:inherit;color:#6b7280}
.cfd-dice-count button.active{border-color:#d97706;background:#fffbeb;color:#92400e}
.cfd-dice-area{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;min-height:96px;align-items:center;margin:8px 0 6px}
.cfd-die{width:72px;height:72px;background:#fff;border-radius:14px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);padding:12px;box-sizing:border-box;box-shadow:0 6px 16px rgba(15,23,42,.18);border:1px solid #e5e7eb}
.cfd-die.rolling{animation:cfd-shake .12s infinite}
@keyframes cfd-shake{0%{transform:translate(0,0) rotate(0)}50%{transform:translate(2px,-3px) rotate(8deg)}100%{transform:translate(-2px,2px) rotate(-8deg)}}
.cfd-pip{width:11px;height:11px;border-radius:50%;background:#1f2937;place-self:center}
.cfd-privacy{text-align:center;color:#9ca3af;font-size:13px;margin:14px 0 30px}
@media(max-width:560px){.cfd-panel{padding:20px 14px}.cfd-btn-big{width:100%}.cfd-coin{width:130px;height:130px}.cfd-face span{font-size:54px}}
