.pgd-play-widget {
  position: fixed;
  right: 24px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 76px);
  z-index: 1060;
  display: block;
  font-family: "Barlow", "Inter", sans-serif;
}

.pgd-play-widget__launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid #e6edf4;
  border-radius: 12px;
  background: #fff;
  color: #2b1c0d;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(43, 28, 13, 0.14);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.pgd-play-widget__launcher:hover,
.pgd-play-widget__launcher:focus-visible {
  border-color: #dbe4ee;
  background: #fff;
}

.pgd-play-widget__launcher:focus-visible,
.pgd-play-widget__head-btn:focus-visible,
.pgd-play-widget__primary:focus-visible,
.pgd-play-widget__ghost:focus-visible,
.pgd-play-widget__horse:focus-visible,
.pgd-play-widget select:focus-visible,
.pgd-play-widget input:focus-visible {
  outline: 2px solid rgba(230, 157, 25, 0.45);
  outline-offset: 2px;
}

.pgd-play-widget__icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.pgd-play-widget__panel {
  position: absolute;
  right: 0;
  bottom: 58px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(340px, calc(100vw - 20px));
  height: auto;
  max-height: min(590px, calc(100dvh - 150px));
  overflow: hidden;
  border: 1px solid #e5dccd;
  border-radius: 8px;
  background: #fffaf3;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: none;
  transition: none;
}

.pgd-play-widget.is-ready .pgd-play-widget__panel {
  transition: opacity 0.14s ease;
}

.pgd-play-widget.is-open .pgd-play-widget__panel {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.pgd-play-widget__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 4px 6px;
  border-bottom: 1px solid #e5dccd;
  background: #fff4d8;
}

.pgd-play-widget__brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.pgd-play-widget__brand-copy {
  display: block;
  min-width: 0;
}

.pgd-play-widget__brand-copy strong {
  display: block;
  color: #06182f;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.pgd-play-widget__brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid #e6edf4;
  border-radius: 8px;
  background: #fff;
}

.pgd-play-widget__brand-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.pgd-play-widget__head-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pgd-play-widget__head-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid rgba(142, 92, 12, 0.16);
  border-radius: 8px;
  background: #fffaf3;
  color: #4a3414;
  cursor: pointer;
}

.pgd-play-widget.is-loading .pgd-play-widget__head-btn[data-pgd-play-refresh] i {
  animation: pgd-play-widget-spin 0.75s linear infinite;
}

.pgd-play-widget__content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  padding: 5px;
  background: #fffaf3;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pgd-play-widget__content > .pgd-play-widget__state {
  grid-row: 1 / -1;
  height: 100%;
  min-height: 0;
}

.pgd-play-widget__state {
  display: grid;
  min-height: 160px;
  place-items: center;
  color: #7b5a28;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.pgd-play-widget__state--silent::before {
  content: "";
  width: 22px;
  height: 22px;
  border: 2px solid rgba(232, 160, 32, 0.18);
  border-top-color: rgba(232, 160, 32, 0.72);
  border-radius: 999px;
  animation: pgd-play-widget-spin 0.75s linear infinite;
}

@keyframes pgd-play-widget-spin {
  to { transform: rotate(360deg); }
}

.pgd-play-widget__filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 5px;
}

.pgd-play-widget__filters label,
.pgd-play-widget__misli {
  display: grid;
  min-width: 0;
}

.pgd-play-widget select,
.pgd-play-widget input {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 10.5px;
  font-weight: 800;
}

.pgd-play-widget select {
  padding: 0 6px;
}

.pgd-play-widget input {
  padding: 0 6px;
}

.pgd-play-widget__workspace {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 5px;
  min-height: 0;
}

.pgd-play-widget__board {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: 1px solid #e6edf4;
  border-radius: 7px;
  background: #fff;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pgd-play-widget__coupon-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
  overflow-x: auto;
  padding: 7px 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pgd-play-widget__content::-webkit-scrollbar,
.pgd-play-widget__board::-webkit-scrollbar,
.pgd-play-widget__coupon-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.pgd-play-widget__leg {
  display: grid;
  min-width: 40px;
  gap: 2px;
}

.pgd-play-widget__leg-head {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-height: 37px;
  padding: 3px 2px;
  border: 1px solid #f2dcad;
  border-radius: 7px;
  background: #fff4d8;
}

.pgd-play-widget__leg-head strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fffaf3;
  color: #2b1c0d;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1;
}

.pgd-play-widget__leg-head span {
  color: #8a641e;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.pgd-play-widget__horse-list {
  display: grid;
  gap: 2px;
  justify-items: center;
}

.pgd-play-widget__horse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #f2f4f7;
  color: #334155;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
	font-family: arial;
  line-height: 1;
}

.pgd-play-widget__horse:hover {
  background: #e9eef5;
}

.pgd-play-widget__horse.is-selected {
  background: #f1a30e;
  color: #231507;
}

.pgd-play-widget__horse.is-disabled {
  background: #f7eff1;
  color: #bd7480;
  cursor: not-allowed;
  opacity: 0.72;
  text-decoration: line-through;
}

.pgd-play-widget__playbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  padding: 5px;
  border: 1px solid #e6edf4;
  border-radius: 7px;
  background: #fffaf3;
}

.pgd-play-widget__playmeta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-width: 0;
}

.pgd-play-widget__total {
  color: #06182f;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  white-space: nowrap;
}

.pgd-play-widget__playactions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px 34px;
  gap: 4px;
  align-items: center;
}

.pgd-play-widget__misli {
  display: grid;
  grid-template-columns: auto 38px;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 30px;
  padding: 0 6px;
  border: 1px solid #e6edf4;
  border-radius: 8px;
  background: #f8fafc;
}

.pgd-play-widget__misli span {
  color: #64748b;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.pgd-play-widget__misli input {
  min-height: 24px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 12px;
}

.pgd-play-widget__primary,
.pgd-play-widget__ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.pgd-play-widget__primary {
  border: 1px solid #d88a00;
  background: #e79b0b;
  color: #241404;
}

.pgd-play-widget__primary:hover {
  background: #f0aa18;
}

.pgd-play-widget__primary:disabled {
  border-color: #eadfce;
  background: #f3eadc;
  color: #8d7a60;
  cursor: not-allowed;
}

.pgd-play-widget__ghost {
  border: 1px solid #e6edf4;
  background: #fff;
  color: #475569;
}

@media (max-width: 768px) {
  .pgd-play-widget {
    right: 16px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 154px);
  }

  .pgd-play-widget__launcher {
    width: 42px;
    height: 38px;
  }

  .pgd-play-widget__icon {
    width: 23px;
    height: 23px;
  }

  .pgd-play-widget__panel {
    position: fixed;
    right: 8px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 202px);
    left: auto;
    width: min(340px, calc(100vw - 16px));
    height: auto;
    max-height: min(590px, calc(100dvh - 218px - env(safe-area-inset-bottom, 0px)));
  }
}

@media (max-width: 420px) {
  .pgd-play-widget {
    right: 16px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 146px);
  }

  .pgd-play-widget__panel {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 194px);
  }
}
