.percent-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 221, 137, 0.72);
  border-radius: 18px;
  background: linear-gradient(145deg, #f0c95b, #b88724);
  color: #06261b;
  font: 900 24px/1 "Segoe UI", Tahoma, sans-serif;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38), 0 0 26px rgba(236, 197, 83, 0.28);
  cursor: pointer;
}

.percent-fab:hover {
  transform: translateY(-1px);
}

.percent-widget {
  position: fixed;
  right: 18px;
  bottom: 84px;
  z-index: 9999;
  width: min(390px, calc(100vw - 28px));
  color: #f7f0d5;
  background:
    radial-gradient(circle at top right, rgba(233, 190, 78, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(12, 72, 54, 0.98), rgba(7, 40, 31, 0.98));
  border: 1px solid rgba(233, 190, 78, 0.34);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  padding: 14px;
  font: 14px/1.35 "Segoe UI", Tahoma, sans-serif;
}

.percent-widget.is-hidden {
  display: none;
}

.percent-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.percent-widget-title {
  margin: 0;
  color: #f2c95b;
  font-size: 18px;
  font-weight: 900;
}

.percent-widget-close {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #f7f0d5;
  width: 34px;
  height: 34px;
  cursor: pointer;
}

.percent-widget label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: rgba(247, 240, 213, 0.84);
  font-weight: 700;
}

.percent-widget select,
.percent-widget input {
  width: 100%;
  border: 1px solid rgba(233, 190, 78, 0.24);
  border-radius: 13px;
  background: rgba(3, 33, 24, 0.84);
  color: #fff7dc;
  padding: 11px 12px;
  font: 700 15px/1.2 "Segoe UI", Tahoma, sans-serif;
  outline: none;
}

.percent-widget select:focus,
.percent-widget input:focus {
  border-color: #f0c95b;
  box-shadow: 0 0 0 3px rgba(240, 201, 91, 0.12);
}

.percent-widget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.percent-widget-result {
  margin-top: 12px;
  border: 1px solid rgba(233, 190, 78, 0.24);
  border-radius: 16px;
  background: rgba(3, 33, 24, 0.62);
  padding: 12px;
}

.percent-widget-result span {
  display: block;
  color: rgba(247, 240, 213, 0.7);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.percent-widget-result strong {
  display: block;
  margin-top: 4px;
  color: #f2c95b;
  font-size: 24px;
  line-height: 1.15;
}

.percent-widget-result small {
  display: block;
  margin-top: 6px;
  color: rgba(247, 240, 213, 0.76);
}

@media (max-width: 620px) {
  .percent-fab {
    right: 12px;
    bottom: 12px;
  }

  .percent-widget {
    right: 12px;
    bottom: 76px;
  }

  .percent-widget-grid {
    grid-template-columns: 1fr;
  }
}
