.content.dice-active {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.dice-game-embedded-mount {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.bl-dice-shell {
  --dc-purple: var(--bl-purple-700, #761083);
  --dc-deep: #21002b;
  --dc-cyan: var(--bl-cyan, #15c7e8);
  --dc-gold: #ffd75a;
  --dc-pink: #d82970;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(5px, 0.8vh, 9px);
  padding: clamp(5px, 0.9vh, 10px);
  color: #fff;
  background:
    radial-gradient(circle at 17% 18%, rgba(255, 215, 90, 0.17), transparent 22%),
    radial-gradient(circle at 80% 18%, rgba(21, 199, 232, 0.22), transparent 22%),
    linear-gradient(180deg, rgba(34, 0, 42, 0.95), rgba(94, 0, 98, 0.82)),
    url("../../../img/logo/logogrand.png") center / min(72vw, 920px) auto no-repeat;
}

.bl-dice-shell *,
.bl-dice-shell *::before,
.bl-dice-shell *::after {
  box-sizing: border-box;
}

.bl-dice-top {
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(76px, 112px) minmax(180px, 260px) minmax(142px, 190px) minmax(94px, 136px);
  gap: 7px;
  align-items: stretch;
}

.bl-dice-brand,
.bl-dice-field,
.bl-dice-toggle,
.bl-dice-result,
.bl-dice-panel,
.bl-dice-note {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(24, 0, 32, 0.8);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.bl-dice-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  overflow: hidden;
}

.bl-dice-brand img {
  width: clamp(32px, 4.5vh, 44px);
  height: clamp(32px, 4.5vh, 44px);
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 3px;
  flex: 0 0 auto;
}

.bl-dice-brand strong {
  display: block;
  color: #fff;
  font-size: clamp(15px, 1.55vw, 24px);
  font-weight: 900;
  line-height: 1;
}

.bl-dice-brand span {
  display: block;
  color: var(--dc-cyan);
  font-weight: 800;
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bl-dice-field {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 5px 8px;
}

.bl-dice-field span,
.bl-dice-result span,
.bl-dice-panel h3 {
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(10px, 0.9vw, 12px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
}

.bl-dice-field b {
  color: #fff;
  font-weight: 900;
}

.bl-dice-field select {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: #211526;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 900;
  padding: 0 6px;
}

.bl-dice-field input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: var(--dc-cyan);
}

.bl-dice-toggle {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 5px;
}

.bl-dice-toggle button,
.bl-dice-primary {
  min-width: 0;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  font-size: clamp(10px, 1vw, 15px);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bl-dice-toggle button {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.bl-dice-toggle button.is-active {
  color: #25002d;
  background: linear-gradient(135deg, #fff7c6, var(--dc-gold));
}

.bl-dice-primary {
  min-height: 48px;
  width: 100%;
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, var(--dc-cyan), #c01ec9 62%, var(--dc-purple));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.bl-dice-toggle button:disabled,
.bl-dice-primary:disabled,
.bl-dice-field select:disabled,
.bl-dice-field input:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.bl-dice-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(174px, 260px);
  gap: clamp(6px, 0.9vw, 10px);
  overflow: hidden;
}

.bl-dice-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: clamp(7px, 1vh, 12px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.18), transparent 16%),
    linear-gradient(145deg, #063347, #2b0738 58%, #52005c);
  box-shadow: inset 0 0 44px rgba(0, 0, 0, 0.34), 0 16px 36px rgba(0, 0, 0, 0.24);
  padding: clamp(8px, 1vw, 14px);
  overflow: hidden;
}

.bl-dice-card {
  align-self: stretch;
  justify-self: center;
  width: min(56vh, 48vw, 420px);
  max-width: 100%;
  aspect-ratio: 1 / 0.74;
  min-height: 130px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.3) 18%, transparent 36%),
    linear-gradient(145deg, rgba(255, 247, 198, 0.95), rgba(21, 199, 232, 0.72) 46%, rgba(216, 41, 112, 0.92));
  box-shadow: inset 0 -22px 42px rgba(36, 0, 42, 0.26), 0 20px 44px rgba(0, 0, 0, 0.32);
  transition: transform 0.24s ease, filter 0.24s ease;
  overflow: hidden;
}

.bl-dice-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

.bl-dice-card.is-win {
  filter: drop-shadow(0 0 18px rgba(255, 215, 90, 0.52));
  transform: translateY(-1px) scale(1.01);
}

.bl-dice-card.is-lose {
  filter: saturate(0.85);
}

.bl-dice-face {
  position: absolute;
  inset: 16px;
  opacity: 0.18;
}

.bl-dice-face span {
  position: absolute;
  width: clamp(13px, 2.2vw, 22px);
  height: clamp(13px, 2.2vw, 22px);
  border-radius: 50%;
  background: #22002b;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}

.bl-dice-face span:nth-child(1) { left: 10%; top: 14%; }
.bl-dice-face span:nth-child(2) { right: 10%; top: 14%; }
.bl-dice-face span:nth-child(3) { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.bl-dice-face span:nth-child(4) { left: 10%; bottom: 14%; }
.bl-dice-face span:nth-child(5) { right: 10%; bottom: 14%; }

.bl-dice-card strong {
  position: relative;
  z-index: 1;
  font-size: clamp(44px, 9vw, 118px);
  font-weight: 950;
  line-height: 0.9;
  color: #fff;
  text-shadow: 0 5px 18px rgba(34, 0, 44, 0.55);
}

.bl-dice-card small {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  font-size: clamp(11px, 1.05vw, 15px);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bl-dice-track {
  position: relative;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(90deg, rgba(21, 199, 232, 0.78), rgba(255, 215, 90, 0.9), rgba(216, 41, 112, 0.85)),
    rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bl-dice-track::before {
  content: "0";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 900;
  color: rgba(34, 0, 44, 0.75);
}

.bl-dice-track::after {
  content: "100";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 900;
  color: rgba(34, 0, 44, 0.75);
}

.bl-dice-track i,
.bl-dice-track b {
  position: absolute;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
}

.bl-dice-track i {
  width: 3px;
  background: #25002d;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.bl-dice-track b {
  width: 16px;
  height: 16px;
  top: 50%;
  bottom: auto;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(34, 0, 44, 0.34), 0 0 18px rgba(255, 255, 255, 0.7);
}

.bl-dice-stats {
  min-height: 58px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.bl-dice-stats span,
.bl-dice-panel span,
.bl-dice-history li {
  min-width: 0;
  border-radius: 8px;
  background: rgba(24, 0, 32, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 2px;
  align-content: center;
  padding: 6px 8px;
}

.bl-dice-stats b,
.bl-dice-panel b,
.bl-dice-history span {
  color: rgba(255, 255, 255, 0.64);
  font-size: clamp(9px, 0.9vw, 12px);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bl-dice-stats strong,
.bl-dice-panel strong,
.bl-dice-history strong {
  color: #fff;
  font-size: clamp(13px, 1.2vw, 18px);
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bl-dice-side {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(70px, 0.58fr) minmax(112px, 0.96fr) minmax(130px, 1.26fr) minmax(44px, 0.32fr);
  gap: 7px;
  overflow: hidden;
}

.bl-dice-result,
.bl-dice-panel,
.bl-dice-note {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.bl-dice-result {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 6px;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 215, 90, 0.2), transparent 42%),
    rgba(24, 0, 32, 0.84);
}

.bl-dice-result strong {
  color: #fff;
  font-size: clamp(17px, 1.7vw, 28px);
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.bl-dice-result small {
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(10px, 0.9vw, 13px);
  font-weight: 900;
}

.bl-dice-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 5px;
  padding: 7px;
}

.bl-dice-panel > div {
  min-height: 0;
  display: grid;
  gap: 4px;
  overflow: hidden;
}

.bl-dice-panel span {
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 24px;
  padding: 4px 6px;
}

.bl-dice-history ol {
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.bl-dice-history li {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 24px;
  padding: 4px 6px;
}

.bl-dice-history li.is-win strong {
  color: var(--dc-cyan);
}

.bl-dice-history li.is-lose strong {
  color: rgba(255, 255, 255, 0.72);
}

.bl-dice-note {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 6px;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(8px, 0.72vw, 11px);
  font-weight: 800;
  line-height: 1.18;
}

@media only screen and (max-width: 900px) {
  .bl-dice-top {
    grid-template-columns: minmax(116px, 1fr) minmax(62px, 84px) minmax(118px, 1fr) minmax(112px, 150px) minmax(72px, 98px);
    gap: 5px;
  }

  .bl-dice-main {
    grid-template-columns: minmax(0, 1fr) minmax(142px, 190px);
  }

  .bl-dice-card {
    width: min(50vh, 54vw, 330px);
  }
}

@media only screen and (max-width: 640px) {
  .bl-dice-shell {
    gap: 4px;
    padding: 4px;
  }

  .bl-dice-top {
    min-height: 130px;
    grid-template-columns: 72px minmax(0, 1fr) 62px;
    grid-template-rows: 30px 28px 30px 30px;
    gap: 4px;
  }

  .bl-dice-brand {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .bl-dice-field:not(.bl-dice-field-wide) {
    grid-column: 1;
    grid-row: 2;
  }

  .bl-dice-field-wide {
    grid-column: 2 / 4;
    grid-row: 2;
  }

  .bl-dice-toggle {
    grid-column: 1 / 4;
    grid-row: 3;
    width: calc(100vw - 8px);
    justify-self: start;
  }

  .bl-dice-primary {
    grid-column: 1 / 4;
    grid-row: 4;
    width: calc(100vw - 8px);
    justify-self: start;
  }

  .bl-dice-brand {
    gap: 5px;
    padding: 4px;
  }

  .bl-dice-brand img {
    width: 28px;
    height: 28px;
  }

  .bl-dice-brand strong {
    font-size: 12px;
  }

  .bl-dice-brand span,
  .bl-dice-field span {
    font-size: 8px;
  }

  .bl-dice-field {
    padding: 3px 4px;
  }

  .bl-dice-field select {
    min-height: 22px;
    font-size: 10px;
    padding: 0 2px;
  }

  .bl-dice-toggle {
    gap: 2px;
    padding: 3px;
  }

  .bl-dice-toggle button,
  .bl-dice-primary {
    min-height: 28px;
    font-size: 7.5px;
    padding: 0 2px;
  }

  .bl-dice-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(96px, 116px);
    gap: 4px;
  }

  .bl-dice-stage {
    gap: 5px;
    padding: 6px;
  }

  .bl-dice-card {
    width: min(44vh, 76vw, 280px);
    min-height: 104px;
  }

  .bl-dice-card small {
    font-size: 9px;
    bottom: 8px;
  }

  .bl-dice-track {
    min-height: 28px;
  }

  .bl-dice-stats {
    min-height: 40px;
    gap: 4px;
  }

  .bl-dice-stats span {
    padding: 3px 4px;
  }

  .bl-dice-stats b,
  .bl-dice-panel b,
  .bl-dice-history span {
    font-size: 7px;
  }

  .bl-dice-stats strong,
  .bl-dice-panel strong,
  .bl-dice-history strong {
    font-size: 10px;
  }

  .bl-dice-side {
    grid-template-columns: 0.8fr 1.2fr 1.05fr 0.75fr;
    grid-template-rows: minmax(0, 1fr);
    gap: 4px;
  }

  .bl-dice-panel,
  .bl-dice-result,
  .bl-dice-note {
    padding: 4px;
  }

  .bl-dice-panel h3,
  .bl-dice-result span {
    font-size: 7px;
  }

  .bl-dice-panel > div,
  .bl-dice-history ol {
    gap: 2px;
  }

  .bl-dice-panel span,
  .bl-dice-history li {
    min-height: 15px;
    padding: 1px 3px;
  }

  .bl-dice-result strong {
    font-size: 12px;
  }

  .bl-dice-result small,
  .bl-dice-note {
    font-size: 6.5px;
    line-height: 1.05;
  }
}
