.ap-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10000;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  font: 14px system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -48%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.ap-modal-header {
  background: #0080f0;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ap-modal-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
}

.ap-close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
}

.ap-modal-body {
  padding: 16px;
  background: #f9f9f9;
}

.ap-modal-section {
  margin-bottom: 16px;
}

.ap-label {
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}

.ap-raw {
  font-family: monospace;
  background: #eee;
  padding: 8px;
  border-radius: 6px;
  white-space: pre-wrap;
}

.ap-decoded div {
  margin-bottom: 4px;
}

.ap-hwxw {
  margin-top: 8px;
  font-size: 13px;
  color: #777;
  text-align: center;
}

.ap-hwxw-empty {
  background: #eee;
  padding: 6px;
  border-radius: 6px;
}

.ap-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 9999;
}
