.kt-game-measurement {
  position: fixed;
  z-index: 20;
  top: max(4.65rem, calc(env(safe-area-inset-top) + 3.35rem));
  right: max(0.65rem, env(safe-area-inset-right));
  direction: ltr;
  color: #fff;
  font: 14px/1.45 system-ui, sans-serif;
  text-align: left;
}

.kt-game-measurement [hidden] { display: none; }

.kt-game-measurement button {
  display: block;
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 0.28em 0.72em;
  border: 1px solid #8baee3;
  border-radius: 10px;
  background: #182034;
  color: #fff;
  font: 600 0.93rem/1.25 system-ui, sans-serif;
  text-transform: none;
  cursor: pointer;
}

.kt-game-measurement .kt-ga-toggle {
  margin-left: auto;
  border-color: #aab4c3;
  background: #fbfcff;
  color: #182034;
  font-size: 12px;
}

.kt-ga-panel {
  box-sizing: border-box;
  position: fixed;
  right: max(0.65rem, env(safe-area-inset-right));
  bottom: max(0.65rem, env(safe-area-inset-bottom));
  width: min(360px, calc(100% - 1.3rem));
  padding: 16px;
  border: 1px solid #8baee3;
  border-radius: 16px;
  background: #182034;
  box-shadow: 0 5px 24px #0c132445;
  animation: kt-ga-in 160ms ease-out both;
}

.kt-ga-panel h2 { margin: 0 0 4px; color: inherit; font: 700 18px/1.35 system-ui, sans-serif; }
.kt-ga-panel p { margin: 0 0 6px; color: inherit; font: inherit; }
.kt-ga-panel a { color: #c9dcff; text-decoration: underline; font: inherit; }
.kt-ga-actions { display: grid; gap: 6px; margin-top: 10px; }
.kt-ga-actions button { width: 100%; min-height: 38px; }
.kt-ga-actions button:hover { background: #293959; }
.kt-game-measurement :focus-visible { outline: 2px solid #b9dbff; outline-offset: 2px; }

@keyframes kt-ga-in { from { opacity: 0; transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .kt-ga-panel { animation: none; } }

@media (max-height: 440px) {
  .kt-game-measurement { top: max(3.7rem, calc(env(safe-area-inset-top) + 3rem)); }
  .kt-ga-panel { padding: 10px; }
  .kt-ga-actions { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
}
