body { margin: 0; min-height: 100vh; display: grid; place-items: center; background: #1b1b1f; color: #fff; font-family: system-ui, sans-serif; }

#device { position: relative; width: 360px; height: 360px; }
#case { position: absolute; inset: 0; border-radius: 50%; z-index: 1;
  background: linear-gradient(145deg, #e8e8ea, #9a9aa0); box-shadow: 0 10px 30px #000a; }

.btn { position: absolute; top: 21px; width: 22px; height: 50px; border: 0; border-radius: 6px; background: #ff8a00; cursor: pointer; z-index: 0; }
#bl { left: 35px; transform: rotate(-45deg); }
#br { left: 303px; transform: rotate(45deg); }

#screen { position: absolute; inset: 25px; z-index: 2; box-sizing: border-box; padding: 20px 30px; overflow: hidden;
  border-radius: 50%; clip-path: circle(50%); background: #000; cursor: pointer; user-select: none; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }

main { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 50px 0 30px; }
.lbl { position: absolute; top: -34px; width: 150px; font-size: 13px; color: #ccc; }
#ll { left: 0; }
#lr { right: 0; text-align: right; }

#shake { width: 260px; padding: 18px 0; border: 0; border-radius: 40px; background: #ff8a00; color: #000;
  font-size: 22px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 0 #a85a00; }
#shake:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #a85a00; }
#shake:disabled { background: #555; box-shadow: 0 6px 0 #333; color: #999; cursor: default; }

h2, h3, p { margin: 0; }
h3 { font-size: 15px; }
small { color: #aaa; font-size: 10px; }
.big { font-size: 64px; line-height: 1; }
.dd { font-size: 20px; }

.rim { min-height: 36px; }
.mid { min-height: 50px; }
.die { font-size: 40px; line-height: 1; padding: 2px 4px; border-radius: 8px; }
.rim .die { font-size: 30px; color: #5f5; }
.die.sel { background: #fc0; color: #000; }

.row { display: flex; justify-content: space-between; width: 80%; box-sizing: border-box; padding: 3px 10px; border-radius: 10px; font-size: 14px; }
.row.sel { background: #fc0; color: #000; }
.bn { opacity: .3; font-size: 12px; }
.bn.on { opacity: 1; color: #fc0; }
.row.sel .bn.on { color: #b34700; }
.row.bonus { color: #888; }
.row.bonus.on { color: #fc0; }
.row.done { background: #1e1e1e; color: #7a7a7a; }
.row.done span { text-decoration: line-through; }


/* Würfel-Zwischensequenz: echte 3D-Würfel über den ganzen runden Bildschirm */
.arena { position: absolute; inset: 0; }
.tumble { position: absolute; left: 50%; top: 50%; width: var(--s); height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); perspective: 450px; will-change: transform; }
.cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: spin var(--d) cubic-bezier(.2, .6, .3, 1) forwards; }
@keyframes spin {
  0% { transform: rotateX(var(--x0)) rotateY(var(--y0)) rotateZ(var(--z0)); }
  100% { transform: rotateX(var(--fx)) rotateY(var(--fy)) rotateZ(var(--fz)); }
}
.f { position: absolute; inset: 0; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); box-sizing: border-box; padding: 14%;
  border-radius: 14%; background: var(--c); box-shadow: inset 0 0 10px #0005; backface-visibility: hidden;
  transform: var(--t) translateZ(calc(var(--s) / 2)); }
.f:nth-child(1) { --c: #f8f8f8; } .f:nth-child(2) { --c: #d8d8d8; } .f:nth-child(3) { --c: #e6e6e6; }
.f:nth-child(4) { --c: #cfcfcf; } .f:nth-child(5) { --c: #fff; } .f:nth-child(6) { --c: #bdbdbd; }
.f b { margin: 12%; border-radius: 50%; }
.f b.p { background: #111; box-shadow: inset 0 2px 3px #000a; }

/* Tabelle, die von unten in den runden Screen gewischt wird */
#sheet { position: absolute; inset: 25px; z-index: 3; border-radius: 50%; clip-path: circle(50%); overflow: hidden; pointer-events: none; }
#sheetin { position: absolute; inset: 0; box-sizing: border-box; padding: 20px 30px; background: #0b0b0b; transform: translateY(100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center;
  pointer-events: auto; touch-action: none; user-select: none; cursor: grab; }
#sheetin.snap { transition: transform .25s ease-out; }
#sheetin .cols { display: flex; gap: 14px; width: 100%; }
#sheetin .col { flex: 1; display: flex; flex-direction: column; gap: 1px; }
#sheetin .row { width: 100%; padding: 1px 6px; font-size: 11px; border-radius: 6px; }
#screen { touch-action: none; }
