.dice-center { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 4% 30px; }
.dice-scale { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; color: var(--muted); margin: 0 4px 12px; }
.dice-scale span { width: 0; display: flex; justify-content: center; position: relative; }
.dice-scale span::after { content: ""; position: absolute; top: 22px; width: 2px; height: 8px; background: var(--line); border-radius: 2px; }

.dice-track {
  position: relative; padding: 14px; border-radius: 999px; cursor: pointer; touch-action: none;
  background: var(--panel-2); box-shadow: inset 0 2px 6px #0006, 0 8px 30px #0005;
}
.dt-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; }
.dt-lose { background: linear-gradient(90deg, #ff2e3f, #ff5a68); transition: width .08s; }
.dt-win  { background: linear-gradient(90deg, #22e07a, #34ef8d); transition: width .08s; }
.dice-track.under .dt-bar { flex-direction: row-reverse; }
.dice-track.under .dt-lose { background: linear-gradient(90deg, #ff5a68, #ff2e3f); }

.dt-handle {
  position: absolute; top: 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); border-radius: 8px; display: flex; gap: 3px; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #4aa0ff, var(--blue)); box-shadow: 0 4px 12px #0008, inset 0 1px 0 #fff5;
  pointer-events: none;
}
.dt-handle i { width: 3px; height: 14px; border-radius: 2px; background: #ffffffb0; }

.dr-lane { position: relative; margin: 0 18px; }
.dice-result {
  position: relative; left: 50%; width: 0; height: 0; transition: left .35s cubic-bezier(.3, 1.3, .5, 1);
}
.dice-result span {
  position: absolute; bottom: 22px; left: 0; transform: translateX(-50%) scale(.7); opacity: 0;
  min-width: 78px; padding: 12px 14px; border-radius: 12px; text-align: center;
  background: #fff; color: #0a1322; font-weight: 800; font-size: 20px; box-shadow: 0 10px 26px #0008;
  transition: transform .25s, opacity .25s, color .2s;
}
.dice-result span::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%) rotate(45deg);
  width: 14px; height: 14px; background: inherit; border-radius: 2px;
}
.dice-result.show span { opacity: 1; transform: translateX(-50%) scale(1); }
.dice-result.win span { color: #0f9c55; }
.dice-result.lose span { color: #e01e33; }

.dice-stats { padding: 16px; border-radius: 12px; background: var(--panel); }
.clickable { cursor: pointer; }
.clickable .inp { cursor: pointer; }
.clickable:hover { border-color: var(--blue); }

@media (max-width: 640px) {
  .dice-center { padding: 50px 2% 20px; }
  .dice-stats { padding: 10px; }
  .dice-stats .inp { font-size: 13px; padding: 0 6px; }
  .dice-stats .suffix { padding-right: 8px; }
}
