/* Dice Roller page — KnightGames redesign (presentation only) */

.dice-page {
  --dice-bg: #070b1a;
  --dice-surface: rgba(12, 18, 40, 0.94);
  --dice-surface-alt: rgba(18, 24, 52, 0.92);
  --dice-border: rgba(99, 102, 241, 0.35);
  --dice-primary: #3b82f6;
  --dice-secondary: #8b5cf6;
  --dice-glow: rgba(139, 92, 246, 0.35);
  --dice-text: #f4f1ff;
  --dice-muted: #9ca3c7;
  --dice-radius: 1.15rem;

  color: var(--dice-text);
  max-width: 52rem;
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
}

.dice-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dice-page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.15rem;
}

.dice-page__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.35), rgba(59, 130, 246, 0.2));
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: #c4b5fd;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.dice-page__title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
}

.dice-page__sub {
  margin: 0.2rem 0 0;
  color: var(--dice-muted);
  font-size: 0.95rem;
}

.dice-page__motto {
  margin: 0;
  color: var(--dice-muted);
  font-size: 0.8rem;
  opacity: 0.85;
  border-left: 1px solid rgba(139, 92, 246, 0.35);
  padding-left: 0.85rem;
}

.dice-page__head-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dr-mute-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: rgba(18, 24, 52, 0.92);
  color: #e9e0ff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Icon comes from CSS so JS cannot blank or stack glyphs. */
.dr-mute-btn::before {
  content: "\1F50A";
  font-size: 1.15rem;
  line-height: 1;
}

.dr-mute-btn[aria-pressed="true"]::before {
  content: "\1F507";
}

.dr-mute-btn:hover {
  border-color: rgba(167, 139, 250, 0.7);
}

.dr-mute-btn:focus-visible {
  outline: 2px solid var(--dice-primary);
  outline-offset: 2px;
}

.dr-mute-btn[aria-pressed="true"] {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.25);
  opacity: 0.85;
}

@media (max-width: 640px) {
  .dice-page__head-actions {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  .dice-page__motto {
    border-left: 0;
    padding-left: 0;
  }
}

/* Main card */
.dr-card {
  border-radius: var(--dice-radius);
  border: 1px solid var(--dice-border);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139, 92, 246, 0.12), transparent 55%),
    var(--dice-surface);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  padding: 1rem 1rem 1.15rem;
}

@media (min-width: 640px) {
  .dr-card {
    padding: 1.15rem 1.25rem 1.35rem;
  }
}

.dr-card__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.dr-stepper {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dr-stepper__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dice-muted);
}

.dr-stepper__controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dr-stepper__btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: var(--dice-surface-alt);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
}

.dr-stepper__btn:hover {
  border-color: rgba(167, 139, 250, 0.7);
}

.dr-stepper__btn:focus-visible {
  outline: 2px solid var(--dice-primary);
  outline-offset: 2px;
}

.dr-stepper__value {
  min-width: 3rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(7, 11, 26, 0.75);
  font-weight: 800;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.dr-stepper__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Settings popover */
.dr-settings {
  position: relative;
}

.dr-settings__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: var(--dice-surface-alt);
  color: var(--dice-text);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.dr-settings__btn:focus-visible {
  outline: 2px solid var(--dice-primary);
  outline-offset: 2px;
}

.dr-settings__btn[aria-expanded="true"] {
  border-color: rgba(167, 139, 250, 0.75);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25);
}

.dr-settings__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 30;
  width: min(18.5rem, calc(100vw - 2rem));
  padding: 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: #0f152c;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  gap: 0.7rem;
}

.dr-settings__panel.is-open {
  display: flex;
}

.dr-settings__field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--dice-muted);
  margin-bottom: 0.3rem;
}

.dr-settings__field select {
  width: 100%;
  min-height: 2.5rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(7, 11, 26, 0.85);
  color: #fff;
  padding: 0.35rem 0.6rem;
}

.dr-settings__field select:focus-visible {
  outline: 2px solid var(--dice-primary);
  outline-offset: 1px;
}

/* Dice stage */
.dr-stage {
  position: relative;
  min-height: 11rem;
  border-radius: 1rem;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background:
    radial-gradient(circle at 50% 45%, rgba(139, 92, 246, 0.18), transparent 55%),
    rgba(5, 8, 20, 0.85);
  box-shadow: inset 0 0 40px rgba(59, 130, 246, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.75rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.dr-stage__ring {
  position: absolute;
  inset: 12%;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.12);
  pointer-events: none;
}

.dr-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem 1.25rem;
  min-height: 6.5rem;
}

/* SVG dice */
.dr-svg-die {
  width: clamp(4.25rem, 18vw, 5.75rem);
  height: clamp(4.25rem, 18vw, 5.75rem);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
  transform-origin: center;
}

.dr-svg-die__face {
  stroke: rgba(196, 181, 253, 0.55);
  stroke-width: 2.5;
}

.dr-svg-die__face--d6 {
  fill: #12182c;
  stroke: rgba(167, 139, 250, 0.65);
}

.dr-svg-die__face--poly {
  fill: #161d36;
}

.dr-svg-die__pip {
  fill: #f5f3ff;
}

.dr-svg-die__value {
  fill: #f5f3ff;
  font-size: 28px;
  font-weight: 800;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.dr-svg-die.is-rolling {
  animation: dr-roll 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--dr-roll-delay, 0ms);
}

@keyframes dr-roll {
  0% { transform: translateY(0) rotate(0deg) scale(1); filter: blur(0); }
  20% { transform: translateY(-14px) rotate(-18deg) scale(1.06); filter: blur(0.4px); }
  45% { transform: translateY(4px) rotate(22deg) scale(0.96); filter: blur(0.8px); }
  70% { transform: translateY(-6px) rotate(-10deg) scale(1.03); filter: blur(0.2px); }
  100% { transform: translateY(0) rotate(0deg) scale(1); filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  .dr-svg-die.is-rolling {
    animation: none;
  }
}

/* Actions */
.dr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.dr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.8rem;
  border: 0;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: filter 140ms ease, transform 140ms ease;
}

.dr-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dr-btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .dr-btn:not(:disabled):hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
  }
}

.dr-btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #60a5fa, #2563eb 55%, #1d4ed8);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.35);
  min-width: 8.5rem;
}

.dr-btn--secondary {
  color: #fff;
  background: linear-gradient(180deg, #a78bfa, #7c3aed 55%, #6d28d9);
}

.dr-btn--ghost {
  color: #bfdbfe;
  background: transparent;
  border: 1px solid rgba(59, 130, 246, 0.55);
}

.dr-btn--danger {
  color: #fecaca;
  background: transparent;
  border: 1px solid rgba(248, 113, 113, 0.5);
}

.dr-btn--sm {
  min-height: 2.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.dr-lower {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

@media (min-width: 1024px) {
  .dr-lower {
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
    align-items: start;
  }
}

/* Result */
.dr-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(10, 14, 32, 0.75);
}

.dr-result__main {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

.dr-result__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  flex-shrink: 0;
}

.dr-result__player {
  margin: 0 0 0.15rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.dr-result__total {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 850;
  color: #fff;
}

.dr-result__detail {
  margin: 0.15rem 0 0;
  color: var(--dice-muted);
  font-size: 0.85rem;
}

.dr-result__stats-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.12);
  color: #e9e0ff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.dr-result__stats-btn:focus-visible {
  outline: 2px solid var(--dice-primary);
  outline-offset: 2px;
}

/* Recent */
.dr-recent {
  border-top: 1px solid rgba(99, 102, 241, 0.2);
  padding-top: 0.75rem;
}

.dr-recent__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.55rem;
  color: var(--dice-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.dr-recent__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dr-recent__item {
  min-width: 3.6rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(12, 16, 36, 0.8);
  text-align: center;
}

.dr-recent__item.is-latest {
  border-color: rgba(59, 130, 246, 0.75);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.dr-recent__player {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  color: #c4b5fd;
  max-width: 6.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dr-recent__total {
  display: block;
  font-weight: 850;
  font-size: 1rem;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.dr-recent__notation {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #93c5fd;
}

.dr-recent__when {
  display: block;
  font-size: 0.65rem;
  color: var(--dice-muted);
  margin-top: 0.1rem;
}

.dr-recent__empty {
  color: var(--dice-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* Stats modal */
.dr-stats-modal {
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 1.1rem;
  background: #0b1022;
  color: var(--dice-text);
  width: min(1100px, calc(100vw - 1.25rem));
  max-height: min(92dvh, 920px);
  padding: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.dr-stats-modal::backdrop {
  background: rgba(2, 6, 18, 0.72);
  backdrop-filter: blur(3px);
}

.dr-stats-modal__inner {
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, 920px);
}

.dr-stats-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.25);
  flex-shrink: 0;
}

.dr-stats-modal__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 850;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dr-stats-modal__sub {
  margin: 0.25rem 0 0;
  color: var(--dice-muted);
  font-size: 0.85rem;
}

.dr-stats-modal__close {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
  font-size: 1.1rem;
}

.dr-stats-modal__body {
  overflow: auto;
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.dr-stats-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.dr-stats-toolbar__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dice-muted);
  margin-right: 0.25rem;
}

.dr-stat-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (min-width: 768px) {
  .dr-stat-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.dr-stat-card {
  border-radius: 0.85rem;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(16, 22, 48, 0.9);
  padding: 0.75rem 0.7rem;
  text-align: center;
}

.dr-stat-card__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dice-muted);
}

.dr-stat-card__value {
  margin-top: 0.25rem;
  font-size: 1.35rem;
  font-weight: 850;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.dr-stat-card__hint {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  color: var(--dice-muted);
}

.dr-chart {
  border-radius: 0.9rem;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(12, 16, 36, 0.75);
  padding: 0.85rem;
}

.dr-chart__title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.dr-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  min-height: 9rem;
  padding: 0.25rem 0.15rem 0;
}

.dr-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.dr-bar__track {
  width: 100%;
  height: 7.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.dr-bar__fill {
  width: 70%;
  max-width: 2.5rem;
  border-radius: 0.4rem 0.4rem 0.15rem 0.15rem;
  background: linear-gradient(180deg, #c4b5fd, #7c3aed 70%, #5b21b6);
  min-height: 0.25rem;
  transition: height 200ms ease;
}

.dr-bar__count {
  font-size: 0.7rem;
  font-weight: 700;
  color: #e9e0ff;
  font-variant-numeric: tabular-nums;
}

.dr-bar__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dice-muted);
}

.dr-section-title {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.dr-table-wrap {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(99, 102, 241, 0.28);
}

.dr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.dr-table th,
.dr-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid rgba(99, 102, 241, 0.18);
}

.dr-table th {
  position: sticky;
  top: 0;
  background: #121833;
  color: var(--dice-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 1;
}

.dr-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.dr-table .tabular-nums {
  font-variant-numeric: tabular-nums;
}

.dr-empty {
  margin: 0;
  text-align: center;
  color: var(--dice-muted);
  padding: 1.5rem 0.75rem;
}

.dr-alert {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.dr-alert--ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.dr-alert--warn {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .dr-btn {
    transition: none;
  }
}

/* Turn Tracker */
.dr-tt {
  border-radius: 0.9rem;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(10, 14, 32, 0.75);
  padding: 0.75rem 0.85rem;
  min-width: 0;
}

.dr-tt.is-empty {
  padding: 0.65rem 0.85rem;
}

.dr-tt__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.dr-tt__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dr-tt__round-head {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.dr-tt__empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
}

.dr-tt__empty p {
  margin: 0;
  color: var(--dice-muted);
  font-size: 0.82rem;
}

.dr-tt__add {
  display: flex;
  gap: 0.4rem;
  min-width: 0;
}

.dr-tt__add--compact {
  margin-top: 0.55rem;
}

.dr-tt__input {
  flex: 1;
  min-width: 0;
  min-height: 2.35rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(7, 11, 26, 0.85);
  color: #fff;
  padding: 0.3rem 0.65rem;
  font-size: 0.88rem;
}

.dr-tt__input:focus-visible {
  outline: 2px solid var(--dice-primary);
  outline-offset: 1px;
}

.dr-tt__hint {
  margin: 0.35rem 0 0;
  color: #fca5a5;
  font-size: 0.75rem;
}

.dr-tt__list-label {
  margin: 0.65rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dice-muted);
}

.dr-tt__list,
.dr-tt__order {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dr-tt__row {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.15rem;
  padding: 0.2rem 0.4rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  background: rgba(12, 16, 36, 0.55);
}

.dr-tt__row.is-current {
  border-color: rgba(96, 165, 250, 0.7);
  background: rgba(37, 99, 235, 0.16);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.dr-tt__row.is-next {
  border-color: rgba(139, 92, 246, 0.35);
}

.dr-tt__row.is-highlight {
  border-color: rgba(196, 181, 253, 0.85);
  background: rgba(139, 92, 246, 0.28);
}

.dr-tt__num {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--dice-muted);
  font-variant-numeric: tabular-nums;
}

.dr-tt__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
}

.dr-tt__badges {
  display: inline-flex;
  gap: 0.25rem;
}

.dr-tt__badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
}

.dr-tt__badge--current {
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.45);
}

.dr-tt__badge--next {
  color: #ede9fe;
  background: rgba(109, 40, 217, 0.4);
}

.dr-tt__row-actions {
  display: inline-flex;
  gap: 0.15rem;
}

.dr-tt__icon-btn {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
  font-weight: 800;
}

.dr-tt__icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dr-tt__icon-btn:focus-visible {
  outline: 2px solid var(--dice-primary);
  outline-offset: 1px;
}

.dr-tt__icon-btn--danger {
  color: #fca5a5;
}

.dr-tt__start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.dr-tt__meta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.dr-tt__text-btn {
  border: 0;
  background: transparent;
  color: var(--dice-muted);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.dr-tt__text-btn:focus-visible {
  outline: 2px solid var(--dice-primary);
  outline-offset: 2px;
}

.dr-tt__current {
  padding: 0.65rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(96, 165, 250, 0.55);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.18), rgba(12, 16, 36, 0.55));
  margin-bottom: 0.55rem;
}

.dr-tt__current-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dr-tt__current-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #93c5fd;
}

.dr-tt__current-name {
  margin: 0.35rem 0 0.55rem;
  font-size: 1.25rem;
  font-weight: 850;
  color: #fff;
  overflow-wrap: anywhere;
}

.dr-tt__timer {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0;
  color: #93c5fd;
  flex-shrink: 0;
}

.dr-tt__timer i {
  font-size: 0.78rem;
  opacity: 0.85;
  transform: translateY(-0.06em);
}

.dr-tt__timer-value {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  color: #fff;
  line-height: 1;
}

.dr-tt__nav {
  display: flex;
  gap: 0.4rem;
}

.dr-tt__nav .dr-btn {
  flex: 1;
}

@media (max-width: 430px) {
  .dr-tt__nav {
    flex-direction: column;
  }

  .dr-tt__start-actions .dr-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dr-tt__row {
    transition: none;
  }
}
