/* 擲骰子頁專用樣式；分頁與欄位沿用 site.css 的 .qr-tabs .qr-field */
.dc-tabs { grid-template-columns: repeat(2, 1fr); }
.dc-chk { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.dc-chk input { width: 22px; height: 22px; flex: none; }
.dc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dc-row > * { min-width: 0; }
.dc-go { width: 100%; min-height: 56px; font-size: 1.2rem; margin-top: 10px; }
.dc-result { margin-top: 12px; background: #eff4ff; border: 2px solid var(--brand); border-radius: 12px; padding: 12px 12px 8px; text-align: center; }
.dc-dice { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 64px; align-items: center; }
.dc-hint { color: var(--muted); }
.dc-die { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; height: 58px; padding: 0 8px; box-sizing: border-box; background: #fff; border: 3px solid var(--brand-dark); border-radius: 12px; font-size: 1.6rem; color: var(--brand-dark); box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.dc-die.d20 { border-radius: 50%; }
.dc-die.d4 { border-radius: 8px 8px 20px 20px; }
.dc-die.d8, .dc-die.d12 { border-radius: 24px; }
.dc-die.rolling { animation: dc-shake .14s linear infinite; }
@keyframes dc-shake { 0% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateY(-3px); } 100% { transform: rotate(-8deg); } }
.dc-sum { font-size: 1.5rem; font-weight: 700; color: var(--brand-dark); margin: 10px 0 2px; text-align: center; }
.dc-detail { margin: 0 0 4px; color: var(--muted); overflow-wrap: anywhere; }
.dc-hist { margin-top: 14px; }
.dc-hist-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.dc-h2 { font-size: 1.05rem; margin: .5rem 0; }
.dc-history { list-style: none; padding: 0; margin: 6px 0 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.dc-history li { padding: 8px 12px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.dc-history li:first-child { border-top: 0; }
.dc-h-t { display: inline-block; min-width: 3.4em; font-weight: 700; color: var(--brand-dark); }
.dc-empty { color: var(--muted); }
.dc-coinwrap { display: flex; justify-content: center; margin: 14px 0 4px; perspective: 600px; }
.dc-coin { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 800; border: 6px solid #b8860b; box-shadow: inset 0 0 0 4px rgba(255,255,255,.35), 0 3px 0 rgba(0,0,0,.2); }
.dc-coin.heads { background: #ffd700; color: #7a5a00; }
.dc-coin.tails { background: #e5e7eb; color: #4b5563; border-color: #6b7280; }
.dc-coin.spin { background: #ffd700; color: #7a5a00; animation: dc-flip .7s ease-in-out; }
@keyframes dc-flip { 0% { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(900deg) translateY(-30px); } 100% { transform: rotateY(1800deg) translateY(0); } }
.dc-stat { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px 12px; }
.dc-stat dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; text-align: center; }
.dc-stat dt { color: var(--muted); font-size: .95rem; }
.dc-stat dd { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--brand-dark); overflow-wrap: anywhere; }
.dc-seq { font-size: 1.05rem; letter-spacing: .08em; overflow-wrap: anywhere; word-break: break-all; }
.dc-live { min-height: 1.4em; margin: 8px 0 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 480px) { .dc-row { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .dc-die.rolling, .dc-coin.spin { animation: none; } }
